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>
This commit is contained in:
Kari Oikarinen 2018-02-12 15:56:28 +02:00
parent 087f26f9da
commit a344758640

View File

@ -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;