summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qtestsupport_core.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Restore qWait() implementationLars Knoll2020-09-131-0/+20
| | | | | | | | | | | | qWait() and qWaitFor() have one subtle difference in behavior, where qWait passes the remaining time to processEvents() and qWaitFor() does not. This lead to instability on timing sensitive tests on macOS. Amends 1abea5f5f13b4b8ec2a1c282e643b791cea12f30 Change-Id: I20f516813ca67d9e86de468c4403e475f08edc26 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Partially revert "Inline QTest::qSleep()"Lars Knoll2020-09-121-0/+29
| | | | | | | | | | | | | | | | | | This change partially reverts change a0e0b51001edfc1c7aea113c472ce995efa833fd. Replacing the QTest specific sleep function with QThread::msleep() was not a good idea. The reason is that QThread::msleep() will force the thread to sleep to x mseconds, even if a signal woke the thread in the meantime. This would cause qWaitFor() to not call processEvents(), in some cases, leading to flakyness and test failures in tests that rely on timing, such as the animation tests in Qt Qml. Change-Id: I0ad132cdf32be5813b2e73552d772251fe1d7f89 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Inline QTest::qSleep()Lars Knoll2020-09-061-32/+0
| | | | | | | Simply use QThread::msleep() to implement it. Change-Id: I37c255fc70951715edc489d9f67669b01af380b1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Remove winrtOliver Wolff2020-06-061-3/+1
| | | | | | | | | Macros and the await helper function from qfunctions_winrt(_p).h are needed in other Qt modules which use UWP APIs on desktop windows. Task-number: QTBUG-84434 Change-Id: Ice09c11436ad151c17bdccd2c7defadd08c13925 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Doc: Make Qt Test snippets compilableNico Vertriest2020-04-031-1/+1
| | | | | | Task-number: QTBUG-81498 Change-Id: I22f07cd539e5e317b6cf15eb369d59915146bd13 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Tidy nullptr usageAllan Sandfeld Jensen2019-12-061-1/+1
| | | | | | | | | | | Move away from using 0 as pointer literal. Done using clang-tidy. This is not complete as run-clang-tidy can't handle all of qtbase in one go. Change-Id: I1076a21f32aac0dab078af6f175f7508145eece0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Replace Q_NULLPTR with nullptr in corelibAllan Sandfeld Jensen2019-04-031-1/+1
| | | | | Change-Id: I9cdb5b7015c62c50b35f8a6519ea4e777db97683 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.12' into 5.12.1Liang Qi2019-01-081-1/+1
|\ | | | | | | | | | | | | Conflicts: src/widgets/kernel/qtooltip.cpp Change-Id: Ic2f9a425359050eb56b3a4e5162cf5e3447058c8
| * QtCore: Unify license headersKai Koehne2018-12-221-1/+1
| | | | | | | | | | Change-Id: Iff4f6da9f0bbf7a0627101f455dd8467681b2783 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Doc: Restore documentation for QTest functions in other modulesTopi Reinio2019-01-041-4/+2
|/ | | | | | | | | | | | | | Qt Test library sources specific to Core, GUI and Widgets modules were moved around in commit 88867e39b. The new source locations must be referenced in Qt Test documentation configuration. The same sources are excluded in their original doc projects, and the related snippet file is moved over to qttestlib. The commit also fixes the remaining documentation issues for Qt Test. Change-Id: Ibe011aa83639e574d647f12bc9e53e618781bce6 Reviewed-by: Martin Smith <martin.smith@qt.io>
* Doc: Move literal code block to a separate fileCristian Maureira-Fredes2018-10-151-12/+2
| | | | | | | | | | | We need to override this snippet for the documentation we generate for Qt for Python, and it is easier to have it on a separate file. Task-number: PYSIDE-801 Task-number: PYSIDE-691 Change-Id: Ideb5b6af25024279f167137d3b65660bb9c96a7e Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* testlib: Move qtestsystem helpers to their respective modulesTor Arne Vestbø2018-07-161-0/+126
Having the helpers in each respective module lets us implement the helpers using private APIs without forcing the test to add private dependencies. It also makes it easier to test Qt using a third party testing framework (for running the test suite), while still using the helpers for ensuring tests behave expectedly. Change-Id: I2a6ce24526ed345f3513548f11da05c7804c203f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>