diff --git a/src/testlib/qtestcase.h b/src/testlib/qtestcase.h index 54669c11de..fbc251a2a2 100644 --- a/src/testlib/qtestcase.h +++ b/src/testlib/qtestcase.h @@ -150,7 +150,7 @@ do {\ // Ideally we'd use qWaitFor instead of QTRY_LOOP_IMPL, but due // to a compiler bug on MSVC < 2017 we can't (see QTBUG-59096) #define QTRY_IMPL(expr, timeout)\ - const int qt_test_step = 50; \ + const int qt_test_step = timeout < 350 ? timeout / 7 + 1 : 50; \ const int qt_test_timeoutValue = timeout; \ QTRY_LOOP_IMPL((expr), qt_test_timeoutValue, qt_test_step); \ QTRY_TIMEOUT_DEBUG_IMPL((expr), qt_test_timeoutValue, qt_test_step)\