From a3447586402a1ca6f40cb6676272f956e5d64431 Mon Sep 17 00:00:00 2001 From: Kari Oikarinen Date: Mon, 12 Feb 2018 15:56:28 +0200 Subject: Remove superfluous call from qWaitFor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ø --- src/testlib/qtestsystem.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') 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; -- cgit v1.2.3