diff options
Diffstat (limited to 'src/testlib/qtestcase.h')
-rw-r--r-- | src/testlib/qtestcase.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/testlib/qtestcase.h b/src/testlib/qtestcase.h index a7e825396a..4beb9ea52d 100644 --- a/src/testlib/qtestcase.h +++ b/src/testlib/qtestcase.h @@ -150,7 +150,8 @@ do {\ #define QTRY_IMPL(expr, timeout)\ const int qt_test_step = 50; \ const int qt_test_timeoutValue = timeout; \ - QTRY_LOOP_IMPL((expr), qt_test_timeoutValue, qt_test_step); \ + bool timedOut = !QTest::qWaitFor([&]() { return (expr); }, qt_test_timeoutValue); \ + Q_UNUSED(timedOut); \ 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 |