summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qtestsupport_core.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2018-10-25 07:21:05 +0200
committerLiang Qi <liang.qi@qt.io>2018-10-25 07:21:53 +0200
commite28e91ae99b8c3859899e04cc9370534c7c7b86d (patch)
treecca81b1e745be4f25aab78e8e917c2324594e539 /src/corelib/kernel/qtestsupport_core.cpp
parent5ea233ca6782eb27adf596515cb66ef3dadc1d5e (diff)
parentebfad73b4e44fe6db8059200da105b4b87888718 (diff)
Merge remote-tracking branch 'origin/5.12' into dev
Conflicts: src/corelib/animation/qpropertyanimation.cpp src/gui/image/qicon.cpp tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp Change-Id: I3698172b7b44ebb487cb38f50fd2c4a9f8a35b21
Diffstat (limited to 'src/corelib/kernel/qtestsupport_core.cpp')
-rw-r--r--src/corelib/kernel/qtestsupport_core.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/corelib/kernel/qtestsupport_core.cpp b/src/corelib/kernel/qtestsupport_core.cpp
index 240e5795db..d69551a227 100644
--- a/src/corelib/kernel/qtestsupport_core.cpp
+++ b/src/corelib/kernel/qtestsupport_core.cpp
@@ -68,13 +68,7 @@ Q_CORE_EXPORT void QTestPrivate::qSleep(int ms)
Example:
- \code
- MyObject obj;
- obj.startup();
- QTest::qWaitFor([&]() {
- return obj.isReady();
- }, 3000);
- \endcode
+ \snippet code/src_corelib_kernel_qtestsupport_core.cpp 0
The code above will wait for the object to become ready, for a
maximum of three seconds.
@@ -91,11 +85,7 @@ Q_CORE_EXPORT void QTestPrivate::qSleep(int ms)
Example:
- \code
- int i = 0;
- while (myNetworkServerNotResponding() && i++ < 50)
- QTest::qWait(250);
- \endcode
+ \snippet code/src_corelib_kernel_qtestsupport_core.cpp 1
The code above will wait until the network server is responding for a
maximum of about 12.5 seconds.