Commit Graph

250 Commits

Author SHA1 Message Date
Daniel Smith
662fec6f0d Update for failures only on dev branch. Use general platform names
This patch was generated with tooling from patchset 31 of
https://codereview.qt-project.org/c/qt/qtqa/+/267034 in interactive
mode. General platform names were chosen if greater than 60% of the
currently active platforms of a given type in COIN recently failed.

Change-Id: Ia4bde7f0ec422bbb727dc9d7151295159094f146
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-08-19 18:22:11 +02:00
Sona Kurazyan
d914a5ba4e Remove the remaining usages of deprecated APIs of qtbase
This change removes the leftovers form other cleanup commits.

Task-number: QTBUG-76491
Change-Id: I61440f87c5a280f9666b78e19aac4d8ac603767e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2019-08-01 06:48:27 +02:00
Daniel Smith
6c136973fd unblacklist passing tests
These tests have not failed on the removed platforms for at least 60 days

Task-number: QTBUG-76608
Change-Id: If7a9f4db907124e3cd54e3f4b0ad3e20717d1912
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-07-08 11:01:42 +00:00
Marc Mutz
cd113d0dcb Port some trivial cases from QMutex to QRecursiveMutex
In all of these cases, the effect of the change is local to one file.

Change-Id: I3bda3aadee3b42e7797183c2330183390b92d1f2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-07-06 11:22:37 +02:00
Marc Mutz
95310aac6d Short live QRecursiveMutex!
Move the recursive mutex use case out of QMutex into a separate class,
unsurprisingly called QRecursiveMutex. As an immediate benefit, 90% of
the QMutex users now enjoy a constexpr QMutex ctor.

This change prepares for a real split in Qt 6, so that both use-cases
are no longer bundled up in one class.

[ChangeLog][QtCore][QMutex] Added QRecursiveMutex as a replacement of
QMutex(QMutex::Recursive).

Change-Id: I79b8724e8a8ee65e4bd0f06acd76103fe4197b8c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-07-06 11:22:16 +02:00
Marc Mutz
f70905448f Add QT_NO_JAVA_STYLE_ITERATORS and mark QtBase free of it
... except for tests, which manually undefine the macro.

Like QT_NO_FOREACH, this is a technical way to keep JSI-free
modules JSI-free going forward.

Change-Id: Icf1342da00a700f42f9e32a253d1cdb94c38dd7e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-07-03 14:48:37 +02:00
Friedemann Kleint
c2b00f8d57 tst_QThread: Add output for all elapsed tests
Obtain diagnostics.

Task-number: QTBUG-76707
Change-Id: I051fb43802a9736cb9542f4adaaf5880b52a407e
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-06-28 00:24:17 +02:00
Friedemann Kleint
ee8dfcaf67 tst_QThread: Blacklist sleep() for Windows
Task-number: QTBUG-76707
Change-Id: Iddce10fb3c8259b829d76596ffc9829f8d013bf3
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-06-26 12:31:52 +02:00
Giuseppe D'Angelo
34fe9232db Port from QAtomic::load() to loadRelaxed()
Semi-automated, just needed ~20 manual fixes:

$ find \( -iname \*.cpp -or -iname \*.h \) -exec perl -pe 's/(\.|->)load\(\)/$1loadRelaxed\(\)/g' -i \{\} +
$ find \( -iname \*.cpp -or -iname \*.h \) -exec perl -pe 's/(\.|->)store\(/$1storeRelaxed\(/g' -i \{\} +

It can be easily improved (e.g. for store check that there are no commas
after the opening parens). The most common offender is QLibrary::load,
and some code using std::atomic directly.

Change-Id: I07c38a3c8ed32c924ef4999e85c7e45cf48f0f6c
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2019-06-20 20:48:59 +02:00
Edward Welbourne
84e89c1e9e Convert uses of QTime as a timer to QElapsedTimer
Change-Id: I2297f61efa5adf9ea5194c7f3ff68574cbcf452c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-06-14 10:42:33 +02:00
Morten Johan Sørvig
6faa4d4a87 QFuture: Wait for result on iterator advance
Wait for the result at the target index if the future
is running and the iterator index is past the current
result count.

Determine if there is a result at the target index
after waitForResult() returns, and return -1/end if
not.

Also support decrementing the end iterator. In this
case wait for the future to finish in order to get
the final result count.

Task-number: QTBUG-59811
Change-Id: I8fcc711bab2e72c3c5196a55b794d25e18bb324d
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-05-13 10:41:25 +02:00
Allan Sandfeld Jensen
1ef274fb94 Replace qMove with std::move
Change-Id: I67df3ae6b5db0a158f86e75b99f422bd13853bc9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-04-06 11:00:38 +00:00
Lars Knoll
bab398aba3 Fix memory leak in auto test
Change-Id: Ie4412b8d8c67e9516225f6fe5b67afed91dcdad5
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2019-03-29 13:46:56 +00:00
Lars Knoll
a9cd08c3f3 Fix memory leak in auto test
Change-Id: I2e8d8cc0f248122b06c7c8313d8effac887adaa8
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2019-03-29 13:46:51 +00:00
Joerg Bornemann
8fe3680193 Add cmdline feature to qmake
[ChangeLog][qmake] A new feature "cmdline" was added that implies
"CONFIG += console" and "CONFIG -= app_bundle".

Task-number: QTBUG-27079
Change-Id: I6e52b07c9341c904bb1424fc717057432f9360e1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2019-02-18 07:12:14 +00:00
Tony Sarajärvi
49ca66583a Expand blacklisting of qthreadpool to cover linux distros
Task-number: QTBUG-38594
Change-Id: I07dccf8ac6ab07e61ddf6090037ea344449724f8
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
2019-01-30 10:10:17 +00:00
Allan Sandfeld Jensen
e61a40bff1 Re-enable thread autotests
Replacing the qmake test with the one corelib/thread/thread.pri uses
for those classes.

Change-Id: Ie803190b821736c89b056ae51b7dfe92046189eb
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-09-25 22:35:40 +00:00
Ulf Hermann
0a06e1baf9 Modernize the "thread" feature
Add it to configure.json and replace all occurrences of QT_NO_THREAD
with QT_CONFIG(thread). Add conditions for other features that depend
on thread support. Remove conditions where we can use the QMutex and
QThreadStorage stubs.

Change-Id: I284e5d794fda9a4c6f4a1ab29e55aa686272a0eb
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-08-17 00:34:36 +00:00
Joni Jäntti
588fcde580 Revert "Blacklist tst_QThread::create"
The "boot2qt" platform needs to be blacklisted,
not "ubuntu-18.04".

This reverts commit 0d49ac0ffc.

Change-Id: I768a66c56f5fc7e0771473152579ed1c01bbbdb9
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2018-07-20 07:00:29 +00:00
Liang Qi
e3ed2281c0 Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
	src/plugins/platforms/cocoa/qnsview.mm
	src/plugins/platforms/cocoa/qnsview_dragging.mm
	src/plugins/platforms/ios/qiosinputcontext.mm
	src/plugins/platforms/xcb/qxcbconnection.cpp
	src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
	src/plugins/platforms/xcb/qxcbwindow.cpp
	src/tools/androiddeployqt/main.cpp
		Was moved from qttools into qtbase in 5.11.
		So re-apply 32398e4d here.
	tests/auto/corelib/global/qlogging/test/test.pro
	tests/auto/corelib/global/qlogging/tst_qlogging.cpp
	tests/auto/corelib/io/qfile/tst_qfile.cpp
	tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp
	tests/auto/corelib/thread/qthreadstorage/test/test.pro
	tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
	tests/auto/widgets/kernel/qapplication/test/test.pro

Done-with: Gatis Paeglis <gatis.paeglis@qt.io>
Done-with: Mårten Nordheim <marten.nordheim@qt.io>
Done-with: Oliver Wolff <oliver.wolff@qt.io>
Change-Id: Id970486c5315a1718c540f00deb2633533e8fc7b
2018-07-02 11:23:45 +02:00
Oliver Wolff
63f78e41dc tst_qthreadstorage: Fix execution for WinRT
Not putting executables into debug/release subdirectories leads to the
WinRT AppxManifest being overwritten by the wrong configuration. When Qt
is configured with -release for example, it was possible that the debug
manifest (Manifest files are always created next to the target) is
written last and thus contains debug VCLibs as a dependency.

Additionally the test was changed in that way, that the resulting file
system structure (having helper and test application in a "top level"
debug and release folder) is the same structure as in tst_qobject.

Change-Id: I53d5238ff36706eb9c6f8eb04b954ec595ca30de
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-06-28 15:44:00 +00:00
Mårten Nordheim
7995540292 tst_qthreadpool: Skip "stackSize" if unsupported
If you're on a Unix platform which don't have the necessary defines then
the thread will never be launched due to an error. Skip the test
instead.

Change-Id: I83159988b8f330a750c7aa328a8805e4fa478070
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-06-27 17:40:28 +00:00
Liang Qi
c3059391fe Make tests compile for Android
This only enables compilation, it doesn't fix any test.

Qt on Android supports process, but not TEST_HELPER_INSTALLS. See also
acdd57cb for winrt.

android-ndk-r10e is used to compile, see
http://doc-snapshots.qt.io/qt5-5.11/androidgs.html .

corelib/io/{qdir,qresourceengine} need to be fixed later.

Done-with: Frederik Gladhorn <frederik.gladhorn@qt.io>
Done-with: Mårten Nordheim <marten.nordheim@qt.io>
Change-Id: I34b924c8ae5d46d6835b8f0a6606450920f4423b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-06-25 08:01:19 +00:00
Mårten Nordheim
06044df0e3 Android: tst_qthread: terminate is not supported
"terminate" and "terminated" both fail on Android since
QThread::terminate not supported on Android. So we should skip them.

Task-number: QTBUG-68596
Change-Id: Id0d1dde2cfa02bb2978e5dd16087bf8f3bf112b0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-06-21 14:14:27 +00:00
Joni Jantti
0d49ac0ffc Blacklist tst_QThread::create
This autotest fails on QEMU armv7 builds.

Task-number: QTBUG-68866
Change-Id: Idb4bf39712a22c40f6d779a46ad2dd1f456ef48b
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2018-06-15 09:13:04 +00:00
Tony Sarajärvi
d2d87e6a9f Extend blacklisting of QSemaphore tests to macOS 10.13
Task-number: QTBUG-58745
Change-Id: Iad16beef04a7b52786b5415944d582d33b1120c8
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-06-11 15:07:00 +00:00
Liang Qi
866b47916d Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
	src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm
	src/plugins/platforms/cocoa/qcocoawindow.mm

Change-Id: Ideea96d1b43d47b1d9b34e11c9986a88e240aa71
2018-04-26 09:55:10 +02:00
Thiago Macieira
309dacedac Atomics: remove requirement for alignment equality with plain types
This was originally added so that you could replace a T with
QAtomicInteger<T> in the same class and still keep ABI. However, for
legacy reasons, on 32-bit x86, types larger than 4 bytes keep an old
1990s alignment of only 4 bytes, but modern std::atomic<T> for those 8-
byte types enforces an alignment of 8 bytes. Therefore, the requirement
to keep alignment is not possible to guarantee.

In other words: you may not replace T with QAtomicInteger<T> or
std::atomic<T> and assume no ABI breakages in all platforms.

This is a requirement to implement atomicity. An 8-byte type aligned to
only a 4-byte boundary could cross a 16-byte boundary or, worse, cross a
cacheline boundary. Crossing the 16-byte boundary could be bad on some
processors, but crossing the cacheline boundary (addresses ending in
0x3C, 0x7C, 0xCC and 0xFC, or 4 out of 64 possible addresses or 6.25%)
is always bad: the CPUs cannot guarantee an atomic load or store
operation.

See also <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71660>.

Task-number: QTBUG-67858
Change-Id: If90a92b041d3442fa0a4fffd15283e4615474582
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-04-24 17:36:42 +00:00
Qt Forward Merge Bot
bfe5e510b9 Merge remote-tracking branch 'origin/5.11' into dev
Change-Id: I954bd6418bc862a04691240c0f1766f6ce033640
2018-04-05 10:02:09 +02:00
Kari Oikarinen
c7dac6469c tst_QThread: Use QTRY_VERIFY instead of qWaits
These two places were sort of manually implementing QTRY_VERIFY except that they
never time out.

Change-Id: I136e6c7400194327c0475c6acfc019825ccec1b5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
2018-04-03 10:20:36 +00:00
Kari Oikarinen
231ac1b878 tst_QFutureWatcher: Avoid unconditional qWait()s
Use QSignalSpy::wait or QTRY_VERIFY instead. This shaved off ~200 ms of the
running time of the test and is more reliable.

Some unconditional qWait()s still remain in this test. They are giving an
opportunity for the wrong thing to happen and thus are not waiting for any
specific condition to be fulfilled.

Task-number: QTBUG-63992
Change-Id: I25a4470fe8d6a5b8b5039b3ed77321d24faa1707
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-04-03 10:20:27 +00:00
Qt Forward Merge Bot
cc920b4cdd Merge remote-tracking branch 'origin/5.11' into dev
Change-Id: I35a6555e3885e489f88aa9b4b0142e1017f7a959
2018-03-21 08:59:26 +01:00
Thiago Macieira
081c001deb QSemaphore: fix deadlock when the woken up thread wakes up another
When the thread that got woken up by release() is supposed to release()
to wake up another thread, we were deadlocking. This happened because we
cleared the bit indicating that there was contention when the first
release(). Instead of storing a single bit, we now store the number of
threads waiting.

Task-number: QTBUG-66875
Change-Id: I72f5230ad59948f784eafffd15193873502ecba4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-03-19 20:36:51 +00:00
Eric Lemanissier
2869bf9f1e implement non-member operator+ for iterators
all of these iterator classes already have a member operator+, which allows iter+int.
This commits addes non-member operator+, which allows int+iter, and forwards to the member
QList and QArrayData iterators now satisfy RandomAccessIterator concept

Change-Id: I25c1dd8cea299e735d5a5e288dbe23dc1d7a1933
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-03-06 22:04:37 +00:00
Friedemann Kleint
5af4cb5a5a Tests: Raise minimum supported MSVC version to 2015
Remove code for older versions and streamline #ifdefs.

Task-number: QTBUG-51673
Change-Id: If456567691538b1a1f452111814c5f9eba401c43
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-01-04 20:23:25 +00:00
Allan Sandfeld Jensen
2c25a431d0 Use dependencies instead of CONFIG+=ordered
Also drops a few instances where the dependency was purely runtime,
especially for examples.

Change-Id: I2a0476f79928143596bdb3b8f01193af90574ae8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-12-02 11:09:15 +00:00
Liang Qi
87204c856a Merge remote-tracking branch 'origin/5.10' into dev
Conflicts:
	src/corelib/thread/qsemaphore.cpp
	tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
	tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp

Change-Id: Id35b535e88df63fdfe4007ea92ed4a39c4b6d707
2017-11-30 09:16:58 +01:00
Liang Qi
1139be7b30 Merge remote-tracking branch 'origin/5.9' into 5.10
Change-Id: Iede384644c3df5ee01b701806dfdb586dd6bb138
2017-11-28 11:23:35 +01:00
Liang Qi
7c4b0aa970 Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts:
	src/corelib/io/qstandardpaths_win.cpp
	src/plugins/platforms/ios/qioswindow.mm
	src/plugins/platforms/ios/quiview.mm
	tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp

Change-Id: I5deb0a0176a454a9c566e924d074ba60ce04f0bc
2017-11-23 12:52:18 +01:00
Liang Qi
19378fa008 Merge remote-tracking branch 'origin/5.9.3' into 5.9
Change-Id: I9add7e07ff1b6a1cf52f59dbb8319f30e114e5fc
2017-11-23 09:47:49 +01:00
Liang Qi
153e8b49ad Merge remote-tracking branch 'origin/5.10' into dev
Conflicts:
	src/network/access/qhttp2protocolhandler_p.h
	src/network/kernel/kernel.pri
	src/network/ssl/qsslkey_qt.cpp
	src/plugins/platforms/cocoa/qcocoascreen.mm
	src/plugins/platforms/windows/accessible/iaccessible2.cpp
	src/plugins/platforms/windows/accessible/iaccessible2.h
	src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp
	src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp
	src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.h
	src/widgets/widgets/qmenu_p.h
	tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
	tests/auto/other/qaccessibility/tst_qaccessibility.cpp
	tests/auto/testlib/selftests/expected_cmptest.lightxml
	tests/auto/testlib/selftests/expected_cmptest.teamcity
	tests/auto/testlib/selftests/expected_cmptest.txt
	tests/auto/testlib/selftests/expected_cmptest.xml

Done-with: Edward Welbourne <edward.welbourne@qt.io>
Change-Id: I4217cc7d840cbae3e3dd28574741544469c4c6b9
2017-11-23 09:36:03 +01:00
Svenn-Arne Dragly
ce08318a46 Add QThreadPool autotest to detect stale threads after tryTake
This test makes sure that we do not introduce a regression where the
threads exited the inner loop over the queue before the queue was
empty. This was triggered by calling tryTake at least maxThreadCount
times, which left the same number of null pointers in the queue
and caused the inner loop to exit too soon for all the threads.

Change-Id: I3a9d800149b88d09510ddc424667670b60f06a33
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-11-16 12:42:44 +00:00
Thiago Macieira
4870282117 QSemaphore: fix regression when the timeout < 0
The issue was introduced by eaee1209f0, so
it affected only 5.9.2.

[ChangeLog][QtCore][QSemaphore] Fixed a regression that would make
tryAcquire() not to wait forever if the timeout was a negative
value. Note: new code is advised to only use -1 to indicate "forever",
as some other functions taking timeout periods do not accept other
values.

Task-number: QTBUG-64413
Change-Id: I57a1bd6e0c194530b732fffd14f58fce60d5dfc9
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-11-14 11:07:30 +00:00
Thiago Macieira
19b0ce5daa Change almost all other uses of qrand() to QRandomGenerator
The vast majority is actually switched to QRandomGenerator::bounded(),
which gives a mostly uniform distribution over the [0, bound)
range. There are very few floating point cases left, as many of those
that did use floating point did not need to, after all. (I did leave
some that were too ugly for me to understand)

This commit also found a couple of calls to rand() instead of qrand().

This commit does not include changes to SSL code that continues to use
qrand() (job for someone else):
  src/network/ssl/qsslkey_qt.cpp
  src/network/ssl/qsslsocket_mac.cpp
  tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp

Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5285d43f4afbf
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-11-08 09:14:03 +00:00
Allan Sandfeld Jensen
fa9d12f4a2 Merge remote-tracking branch 'origin/5.10' into dev
Conflicts:
	src/plugins/platforms/windows/qwindowsmousehandler.cpp
	src/plugins/platforms/xcb/qxcbimage.cpp
	tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
	tests/manual/qtabletevent/regular_widgets/main.cpp

Done-with: Friedemann Kleint<Friedemann.Kleint@qt.io>
Done-with: Mårten Nordheim<marten.nordheim@qt.io>
Change-Id: I5b2499513a92c590ed0756f7d2e93c35a64b7f30
2017-10-24 13:40:55 +02:00
Liang Qi
d0a0a3c041 Merge remote-tracking branch 'origin/5.10' into dev
Conflicts:
	examples/network/fortuneclient/client.cpp
	examples/network/fortuneserver/server.cpp
	src/platformsupport/platformcompositor/qopenglcompositorbackingstore_p.h
	src/plugins/platforms/cocoa/qcocoabackingstore.h
	src/plugins/platforms/cocoa/qcocoaintegration.h
	src/plugins/platforms/cocoa/qcocoascreen.h
	src/plugins/platforms/ios/qiosbackingstore.h
	src/plugins/sqldrivers/oci/qsql_oci.cpp
	src/widgets/kernel/qwidgetwindow.cpp

Change-Id: Ia6dd2c52d4a691b671cf9a2ffca70deccece8f10
2017-10-17 10:34:24 +02:00
Liang Qi
01afc8c810 Merge remote-tracking branch 'origin/5.9' into 5.10
Change-Id: I3cf73c53cf131d0babfb558c2507bed0e0fc5f08
2017-10-16 22:21:52 +03:00
Giuseppe D'Angelo
cb08b40976 Move detection of <future> to a configure test
<future> is needed by QThread::create. Instead of a fragile series
of preprocessor tests, move its detection to a configure test.
This dramatically simplifies the code, but on the other hand ties
the availability of QThread::create() to the system used to compile
Qt (rather the one used to compile an application).

Change-Id: If1b06363379bf29126cfa68f2a0651cbb78a67f7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-10-06 05:51:54 +00:00
Svenn-Arne Dragly
ba423261cd Improve performance in QThreadPool
When many runnables are executed, this improves the
performance by not resizing the queue for each runnable,
which was the case in the previous version, because of
many calls to QVector::takeFirst().

Also add a test that makes sure tryTake() is safe to
call and does not leave the queue in a bad state that
tries to use nullptr entries.

Change-Id: I608134ecfa9cfc03db4878dcbd6f9c1107e13e90
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-10-04 12:00:33 +00:00
Liang Qi
aadfe7d634 Merge remote-tracking branch 'origin/5.10' into dev
Conflicts:
	src/gui/kernel/qguiapplication.cpp
	src/platformsupport/input/libinput/qlibinputpointer.cpp
	src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h
	src/plugins/platforms/cocoa/qcocoawindow.h
	src/testlib/qtestsystem.h

Change-Id: I5975ffb3261c2dd82fe02ec4e57df7c0950226c5
2017-09-26 16:14:54 +02:00