diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-09-13 13:15:56 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-09-13 13:22:46 +0200 |
commit | 46c1e609893b09a61d70dda3589e6b8d25261468 (patch) | |
tree | c2ab3c72c7301960a611beed21d02182de4f2b8e /src/corelib/kernel/qtestsupport_core.h | |
parent | 127fb8bb5587db52216d0ac934f3111170a7cbe3 (diff) |
Restore qWait() implementation
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>
Diffstat (limited to 'src/corelib/kernel/qtestsupport_core.h')
-rw-r--r-- | src/corelib/kernel/qtestsupport_core.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/corelib/kernel/qtestsupport_core.h b/src/corelib/kernel/qtestsupport_core.h index 2abe70bf99..01b3fda7d9 100644 --- a/src/corelib/kernel/qtestsupport_core.h +++ b/src/corelib/kernel/qtestsupport_core.h @@ -88,10 +88,7 @@ Q_REQUIRED_RESULT static bool qWaitFor(Functor predicate, int timeout = 5000) return predicate(); // Last chance } -inline void qWait(int ms) -{ - (void)qWaitFor([]() { return false; }, ms); -} +Q_CORE_EXPORT void qWait(int ms); } // namespace QTest |