diff options
author | Kari Oikarinen <kari.oikarinen@qt.io> | 2018-02-12 15:56:28 +0200 |
---|---|---|
committer | Kari Oikarinen <kari.oikarinen@qt.io> | 2018-02-14 07:20:38 +0000 |
commit | a3447586402a1ca6f40cb6676272f956e5d64431 (patch) | |
tree | baafe83a87a6450593bbf5aef66d701e9bce1c1c /src/testlib/qtestsystem.h | |
parent | 087f26f9dae4b0b7af6cb9e7e9c3737b9a911a46 (diff) |
Remove superfluous call from qWaitFor
The remaining time will be fetched again after checking the predicate, so the
read value was never used.
Change-Id: I627152116ea579577e490ecefbaee02fec4aabdc
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/testlib/qtestsystem.h')
-rw-r--r-- | src/testlib/qtestsystem.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/testlib/qtestsystem.h b/src/testlib/qtestsystem.h index 79fe68004e..de6bd177d3 100644 --- a/src/testlib/qtestsystem.h +++ b/src/testlib/qtestsystem.h @@ -74,10 +74,8 @@ namespace QTest QCoreApplication::sendPostedEvents(nullptr, QEvent::DeferredDelete); remaining = deadline.remainingTime(); - if (remaining > 0) { + if (remaining > 0) QTest::qSleep(qMin(10, remaining)); - remaining = deadline.remainingTime(); - } if (predicate()) return true; |