Commit Graph

28343 Commits

Author SHA1 Message Date
Anton Kudryavtsev
f217894152 QDateTimeEdit: remove homebrew 'reverse' algorithm
Use std::reverse

Change-Id: Ia922f3e05e100587f0e7bc91bb1a95679bc03896
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-07-05 18:58:39 +00:00
Anton Kudryavtsev
3a33ee78c9 Tools: replace QString::trimmed() with QStringRef::trimmed()
... where it's possible. Reduce allocations.

Change-Id: I9908d9d65177d116a8a54146274a74edb801543e
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-07-05 18:58:27 +00:00
Anton Kudryavtsev
5392259ce6 QXml: reduce allocations in extractEncodingDecl
Replace QString::left() with QString::leftRef().
Use QStringLiteral more.

Change-Id: Ibcecc666d034a5e1fe963119483030ab397b16b1
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-07-05 18:57:35 +00:00
Friedemann Kleint
e7d4760314 Testlib: Format QRegion in QCOMPARE
Output regions as a compact list of rectangles:
QRegion(2 rectangles, 50x200+100+200, 200x50+10+10)

Change-Id: I62e42bd30897a1d31b28e0cbd6afe7fa8ecf2664
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-07-05 18:49:19 +00:00
Kevin Funk
6583720aa4 Revert "CMake: Add imported target for qdoc."
This reverts commit dc0ae02ebc.
qdoc is a binary built inside the qttools repository, thus it should be added
to the respective ConfigExtras.cmake.in there instead.

Task-number: QTBUG-54446
Change-Id: I182e5889af164a89c68226a91abc4d9962a508ea
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-07-05 14:40:29 +00:00
Thiago Macieira
840729a931 QDateTime: use the more efficient currentMSecsSinceEpoch()
... instead of creating a QDateTime object.

Change-Id: Ib57b52598e2f452985e9fffd145a36911de4fa9a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-07-02 07:51:11 +00:00
Thiago Macieira
d9b545152d QFormLayout: Remove internal, unused functions
Found by the Intel Compiler 17 Beta on Windows:

qformlayout.cpp(68): error #177: function "<unnamed>::FixedColumnMatrix<T,
NumColumns>::addRow [with T=QFormLayoutItem *, NumColumns=2]" was declared but never referenced

Change-Id: Ib57b52598e2f452985e9fffd1458f6a3c3a609dc
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2016-07-02 07:51:07 +00:00
Alex Trotsenko
3c93286f08 QDataStream: unify deserialization of containers
Serialization of the Qt container classes is accomplished by breaking
up the data into primitive units. On the receiver side, these units
should be read atomically to guarantee integrity of the container.

Deserialization procedures for QHash and QMap were already implemented
in accordance with this strategy and have the following behavior:

 - a previously latched error status is saved for the caller. This
   overrides possible different errors in the current read. This
   is consistent with the treatment of primitive types.
 - if an error occurs during the deserialization, the container is
   cleared.

To make the API consistent, this patch adjusts the behavior of QList,
QLinkedList, QVector, and QSet deserialization. On the implementation
side we accomplish this with a private StreamStateSaver RAII class that
consolidates the handling of the stream status for all containers.

[ChangeLog][Important Behavior Changes][QtCore][QDataStream] Incomplete
reads of Qt containers are now handled same way as for primitive types,
meaning that previous errors are latched.

Task-number: QTBUG-54022
Change-Id: I5c77257fe2a4637e8a7e6cf3cd43091c8469340e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-07-01 16:08:41 +00:00
Friedemann Kleint
fbe67f06bc Diaglib: Build DebugProxyStyle only when QtWidgets are used
Change-Id: Iba1ca731ac569db12211a93f65583d73ffcfce91
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2016-07-01 09:25:42 +00:00
Błażej Szczygieł
e2665600c0 xcb: Send expose event while shrinking windows
Send synthesized expose event while shrinking the QWindow. This fixes
the regression which can break some applications which need the paint
events while shrinking the QWindow.

Added auto test.

Task-number: QTBUG-54040
Change-Id: Iaa992abba67f428237fa12c6cae56592b8fcadb0
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Reviewed-by: Louai Al-Khanji <louai.al-khanji@qt.io>
2016-06-30 06:51:48 +00:00
Anton Kudryavtsev
25f040820c QAbstractItemView: avoid search through QIndexEditorHash
Search's implicit cast (QModelIndex to QPersistentModelIndex) is slow.
Use cheap pre-test to avoid when we can.

Use method from 1d859ef805

Change-Id: Ic3d06869de717963bad6357abb99f3e025642078
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-06-30 04:57:16 +00:00
Liang Qi
592da13664 Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7 2016-06-29 12:50:54 +00:00
Liang Qi
f27d8b9f57 Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: If6ba05867e7c98159e1b94ff71923e8b36bdbccb
2016-06-29 10:10:22 +02:00
Anton Kudryavtsev
b9b3bff424 QAbstractItemView: use erase and std::remove_if with QList
... instead of using erase() in a loop, with quadratic complexity.

Change-Id: Id9c70a0d1d27b5057e5bf64c315bd66cbcd67330
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-06-29 07:51:20 +00:00
James McDonnell
0d720a000f Improve SQLite3 configuration test
Reference an SQLite3 function to verify that the library is being
linked.  Discovered that the test didn't do this when I switched the
Windows configure to use a compile test to determine whether the
system has SQLite3.  The test passed even though the initial
configure changes failed to provide the test with information about
the SQLite3 libraries.

Change-Id: I3114cfc2dec3a42a60c8e1e432eb8375b440d7e0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-06-28 14:36:01 +00:00
Oswald Buddenhagen
a8c98dcb89 fix default inc/lib path detection on msys
using the Makefile target separator to determine the host system is of
course not a terribly good idea. the correct variable to query would be
DIR_SEPARATOR, which always reflects the host. however, a direct os
query is less obscure in this case.

Task-number: QTBUG-54346
Change-Id: I6bc1372a7c9a84a241a97f9f767f046b026411c3
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2016-06-28 10:41:44 +00:00
Laszlo Agocs
2a7cee47e5 Avoid artifacts when hiding or closing a QOpenGLWidget or QQuickWidget child
windows and xcb enables SwitchableWidgetComposition meaning that widget
backing stores will fall back to the normal flush path when no render-to-texture
widgets are visible anymore in the window. This switch however can lead to
artifacts with the image of the rtt widget remaining visible until the next
full bacinkgstore sync. The safe and simple way around this is to do the
switch only in the next flush, keeping the flush where the switch is
discovered on the OpenGL-based composition path still.

Task-number: QTBUG-54241
Change-Id: I1d3f10999f69c58efa791dd724891add56949dee
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2016-06-28 06:48:39 +00:00
Ralf Nolden
fe9ca6ede8 NetBSD: enable detection of posix_fallocate()
posix_fallocate() is declared in unistd.h on NetBSD. Add the include
for proper detection on NetBSD 7.0 and up.

See http://netbsd.gw.com/cgi-bin/man-cgi?posix_fallocate++NetBSD-current

As that is violating the POSIX standards, a PR was opened at NetBSD
under http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=51287
for further tracking of the issue.

Change-Id: I40ec320677eef37bbc39f58e0bbac34f8cf7b8da
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-06-28 05:49:24 +00:00
Ralf Nolden
b3b2f502e9 NetBSD: use paccept() where accept4() is used
Where accept4() is used, NetBSD offers paccept() as a replacement function.
Modify check for using accept4() and use paccept() on NetBSD.

See http://netbsd.gw.com/cgi-bin/man-cgi?paccept++NetBSD-current
and http://reviews.llvm.org/D12485

Change-Id: I9b3ecba5f3afad6c357d3f7b8f89589bf313e273
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-06-28 05:49:18 +00:00
Ralf Nolden
1a96295755 Libpng config.tests: use pkg-config when available
Add pkg-config to the libpng usages as not all systems have the
symlink libpng.so -> libpng<version>.so (affected: NetBSD) that changes
with the version of the lib. If no-pkg-config is used, use -lpng as
before. Tested with FreeBSD 10.3, NetBSD 7.0.1 using png 1.6.21

Change-Id: I5c87f380c84da3d5c56c94da53adb900791c8caa
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-06-27 18:45:29 +00:00
Olivier Goffart
0c44f26fae QDockWidget: fix floating group tab window not having the right title
Before, we were relying on the ZOrderChange event to update the
windows title or other flags of a floating tab window when tabs
are changed. But this did not catch all the cases. For example,
the first tab switch, or when tabs are dragged out.

Task-number: QTBUG-53754
Task-number: QTBUG-52107
Change-Id: I1523ce85ceaa95f044bd81f8ccbac0a86978fb33
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
2016-06-25 11:46:51 +00:00
Olivier Goffart
ac9899b4cb mainwindow example: fix creating custom QDockWidget
The signal was connected to the wrong slot.
Regressed in 2fe56e37ed.

Change-Id: I33135fc79c3585dfbe0f6ebc04f819e919ed9ed7
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
2016-06-24 10:57:56 +00:00
Topi Reinio
dc283936b0 Doc: Remove obsolete QtWebKit entries from the example metadata
Change-Id: I60caf454ae7e5f6e0c0bd2c2eb1934bc0f7e3fba
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2016-06-24 07:36:59 +00:00
Anton Kudryavtsev
b6cf041867 Widgets: use QStringRef to optimize memory allocation
Replace substring functions that return QString with
corresponding functions that return QStringRef where
it's possible.

Create QString from QStringRef only where necessary.

Change-Id: I728c4338135f83d9cdff4d1ee1aed77f95d453b8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-06-24 07:29:03 +00:00
Oswald Buddenhagen
17519feadd don't override user-provided dependencies for our extra compilers
while the names of the compilers are actually an undocumented internal,
we don't provide an actually working proper way to sequence extra
compiler execution with build-time generated inputs when they are
indirectly listed (as via .qrc files).

Task-number: QTBUG-54299
Change-Id: I269c26512897b72706dc8b769aa47e8157c2a5c5
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-06-23 13:25:22 +00:00
Liang Qi
5cfb80a28e Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/angle/src/libGLESv2/libGLESv2.pro
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp

Change-Id: If8da4cfe8f57fea9f78e7239f378a6302c01674e
2016-06-23 10:29:37 +02:00
Gunnar Sletta
8fa40b3b37 Add -no-opengles3 to configure to avoid QT_OPENGL_ES_3 define.
This can be helpful for packaging and when one wants to limit the
features to ES 2.0 to ensure the same code is used on both build
machine and deployment machine. It also prevents inclusion of
GLES3/gl3.h. Windows configure.exe doesn't do auto detection of
GLES3 so it does not get the additional option.

Change-Id: I8750b41635e41bd0ac41d9d59d93570f7d2196e6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2016-06-23 07:51:24 +00:00
Kai Koehne
3986e1cb22 Document limitations and good practice for logging category names
Task-number: QTBUG-54238
Change-Id: I2b6f54fb26d24e6da19c0e09782483eeb10206e1
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Michael Brasser <michael.brasser@live.com>
2016-06-23 07:11:34 +00:00
Thiago Macieira
f4be16e1f7 Win: Get rid of unused variables un QDateTime::currentMSecsSinceEpoch
The compiler didn't complain that they were unused or -Werror / -WX was
not active.

Change-Id: Ib57b52598e2f452985e9fffd145a7b63a32189fd
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2016-06-22 23:26:43 +00:00
Liang Qi
0f4affc0b1 Fix inconsistency between the #if guards in SSL PSK code
The declaration and definition of the forwarding functions for PSK
differed which leads to link errors with some versions of openssl.

Change-Id: I40410f62a584c5dbd2acf5c90422e1243514f8fd
Reviewed-by: Richard J. Moore <rich@kde.org>
2016-06-22 22:36:23 +00:00
Jake Petroules
4b0cb35b84 Fix installation of debug symbols on Apple platforms.
This follows up ab599a3931, which did not
take installation into account.

Task-number: QTBUG-54036
Change-Id: Ic1b3acb8984255dd1ca1c288b7b150814ce9e606
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-06-22 22:30:03 +00:00
Ralf Nolden
9caac0f176 Add OpenBSD to list of targets that can't use --no-undefined in qtcore
A prior commit has already added the resetting of QMAKE_LFLAGS_NOUNDEF
in corelib.pro for FreeBSD due to environ(7) not being part of libc.
OpenBSD has the same issue, so add it to the list of BSD systems
affected for resetting the flags for qtcore.

Change-Id: I50a62271ffa05a9976e802de420d47a1425359c4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-06-22 16:25:22 +00:00
Allan Sandfeld Jensen
f968bd665e Fix regression in simple RGB16->RGB16 scaling
The fix for QTBUG-35927 introduced a too strict check when scaling from
a 16-bit source to a 16-bit destination. This patch changes the limit
to adjust to source type.

Task-number: QTBUG-54281
Change-Id: I6dd2bb8308f77520c00fa3ef6643a42462c5d351
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-06-22 16:09:12 +00:00
Oswald Buddenhagen
1d034244c2 purge vestige: plugin_no_soname is no more
... for a loooong time.
it was replaced by plugin_with_soname (which is unused so far).

Change-Id: Ifc377d155d6eac41e85f3a0914ed817d55b5648b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-06-22 15:13:02 +00:00
Oswald Buddenhagen
4c630fce9e fix make -i wreaking havoc in configure tests outside qtbase
the tests would inherit MAKEFLAGS, with somewhat predicatble results.

Change-Id: Ia17638f6229d0ae86f5558726850040703d90044
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-06-22 15:12:57 +00:00
Oswald Buddenhagen
32a3bcb359 fix double installation of ANGLE libraries in static+dynamicgl builds
CONFIG static/shared needs to be manipulated before it is used by
qt_installs.prf (via qt_helper_lib.prf via config.pri).

amends 2311997.

Task-number: QTBUG-54109
Change-Id: Icb53f3170e6d6f09d60b77a221f4f239c6e6721f
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-06-22 15:12:52 +00:00
Oswald Buddenhagen
5c38740031 limit installation of ANGLE translator and preprocessor helper libraries
libGLES2 (the only user of these libraries) is built dynamically even in
a static qt built when dynamicgl is configured. in this case the static
libraries need not be installed.

amends 2311997.

Change-Id: Ic9bc3937d6ee0d97e0ca7fc96596fa90ebfe8710
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-06-22 15:12:48 +00:00
Oswald Buddenhagen
dc2fcd3f8f don't duplicate CONFIG+=installed
the included common.pri already does it.

amends 9ab41425.

Change-Id: If8c9285b92485b6574fde2adc2b92cc44f139ea0
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-06-22 15:12:41 +00:00
Oswald Buddenhagen
1824e43b51 make plugin meta data load failure error message less cryptic
Change-Id: I280673e7fd582c5877e8e17ed00318cb10cd537c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-06-22 15:12:36 +00:00
James McDonnell
f99bcd763d Add some 64-bit QNX platforms
Add x86-64 and aarch64le QNX platforms.  These platforms will be
available in QNX 7.0.

Change-Id: Iba1f635ba45fddf1a1caf907415a23a510ba0818
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-06-22 14:59:26 +00:00
Friedemann Kleint
450e7f06f2 QDesktopScreenWidget::screenNumber(): Use native geometry.
Coordinates in device independent pixels are not suitable for checking
intersection of screen areas since the screen positions are always
unscaled.

Move the code to determine the QWindow handle out and transform
the frame to device pixels and use QPlatformScreen to check.

Change-Id: Idd94f32abc43bc7a04e4056243b7f810631f70cc
Task-number: QTBUG-52606
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2016-06-22 11:22:24 +00:00
Olivier Goffart
f54bd20f6a Revert "End the drag if the dockwidget is being hidden"
This reverts commit 75b705fec8
and 798e0064e9.

This broke drag and drop of QDockWidget if there is no animations
(QTBUG-54185)  and this caused numerous crash with GrouppedDragging:
crashes when dropping on another floating QDockWidget, or when
dragging away.

The problem being that 'endDrag' would cause the QDockWidget to be hiden
temporarily and it would recurse into 'endDrag' and have unwanted effects

Task-number: QTBUG-54185
Change-Id: Icad9c6748448783e039bde205b60133f89f25e8e
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2016-06-22 09:25:38 +00:00
BogDan Vatra
930e750b7a Remove duplicated QT_HAS_BUILTIN define
QT_HAS_BUILTIN is already defined in qcompilerdetection.h which is
included in qglobal.h which is included in this header file.

Task-number: QTBUG-54068
Change-Id: I46c2e13d85fc21d3e6c426d0f35a584b21ae792b
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2016-06-21 18:58:27 +00:00
Laszlo Agocs
7592643407 eglfs: Fix static builds with kms backends
The logging category symbol clashed when linking applications with both
kms backends present.

This is no longer an issue in 5.7 where the symbol is in the shared kms
support lib, but for 5.6 we need to use a different symbol name.

Change-Id: I3c323109d6c498e044289455b3d31567a4d5928c
Reviewed-by: Ralf Nolden <nolden@kde.org>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2016-06-21 12:52:53 +00:00
Tor Arne Vestbø
1a7e577669 UIKit: Treat windows as exposed only during Qt::ApplicationStateActive
We previously treated Qt::ApplicationStateInactive as a valid state to
expose windows in, to prevent a visible flash of black screen at app
startup between iOS hiding the launch screen and Qt drawing it's first
frame, but this lag is no longer an issue, so we can apply the best
practice of only rendering during Qt::ApplicationStateActive. This may
prevent crashes during application suspension.

Task-number: QTBUG-52493
Change-Id: I271281ed6fb857e6849cdb88cc2d8251d1bba1df
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2016-06-21 12:52:44 +00:00
Liang Qi
5f0ec7305e Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7 2016-06-20 07:54:09 +00:00
Andy Shaw
bf8014a269 Add PowerVR SGX 554 to the BGRA blacklist
PowerVR SGX 554 is used in iPad wi-fi (4th generation) and blacklisting
it solves a problem with grabToImage() in QQuickItem.

Task-number: QTBUG-45902
Change-Id: I4b6210a48f70614c4364fc63692c97652836f5d3
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2016-06-20 07:45:07 +00:00
Liang Qi
e32f1a4d61 Merge remote-tracking branch 'origin/5.6' into 5.7
And blacklisted a few tests in tst_QUdpSocket.

Conflicts:
	src/android/jar/src/org/qtproject/qt5/android/QtNative.java
	src/corelib/global/qglobal.cpp
	src/corelib/global/qsystemdetection.h
	src/corelib/io/qfileselector.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp
	tests/auto/network/socket/qudpsocket/BLACKLIST

Task-number: QTBUG-54205
Change-Id: I11dd1c90186eb1b847d45be87a26041f61d89ef6
2016-06-20 08:00:26 +02:00
Thiago Macieira
683c30074e Add "-softfloat" to archdetect.cpp and clarify what to use when
Change-Id: I1cc7601489634e96833cfffd14563e033c85ff6d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-06-19 18:46:36 +00:00
Thiago Macieira
7497cfcfcb PowerPC: Add detection of SPE (found on e500) and VSX
Poky (Yocto's reference distro) has a special build for the e500v2, so
I'm guessing this ABI is somewhat important.

Change-Id: I14839ba5678944c2864bffff14176c4d61b8799f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-06-19 18:46:26 +00:00