summaryrefslogtreecommitdiffstats
path: root/src/testlib/qtestcase.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2017-02-23 10:32:31 +0100
committerLiang Qi <liang.qi@qt.io>2017-02-23 10:07:57 +0000
commit35fa30e65d26b9e4840cfa793ed8369b3475c1fd (patch)
treef7bc9a23b01682eedfab4f5113afa1c1764515f6 /src/testlib/qtestcase.h
parent21298aad45ebf770122d9f843b379a077239ecc1 (diff)
Revert "testlib: Add qWaitFor to wait for predicate"
This reverts commit 3b38392844dd9e145a4783445fd3c96e84bb94d1. The change caused test compile failures with MSVC2015 in qqmlsettings; a variable was not captured in the lambda expression. This appears to be a compiler bug of MSVC. Task-number: QTBUG-59096 Change-Id: I3bf5288eb005b2e1661819bb33bc54fb944d0150 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/testlib/qtestcase.h')
-rw-r--r--src/testlib/qtestcase.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/testlib/qtestcase.h b/src/testlib/qtestcase.h
index 4beb9ea52d..a7e825396a 100644
--- a/src/testlib/qtestcase.h
+++ b/src/testlib/qtestcase.h
@@ -150,8 +150,7 @@ do {\
#define QTRY_IMPL(expr, timeout)\
const int qt_test_step = 50; \
const int qt_test_timeoutValue = timeout; \
- bool timedOut = !QTest::qWaitFor([&]() { return (expr); }, qt_test_timeoutValue); \
- Q_UNUSED(timedOut); \
+ QTRY_LOOP_IMPL((expr), qt_test_timeoutValue, qt_test_step); \
QTRY_TIMEOUT_DEBUG_IMPL((expr), qt_test_timeoutValue, qt_test_step)\
// Will try to wait for the expression to become true while allowing event processing