diff options
Diffstat (limited to 'tests/auto/corelib/thread/qfuture/tst_qfuture.cpp')
-rw-r--r-- | tests/auto/corelib/thread/qfuture/tst_qfuture.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/corelib/thread/qfuture/tst_qfuture.cpp b/tests/auto/corelib/thread/qfuture/tst_qfuture.cpp index 408a90afc4..d4a3ee6054 100644 --- a/tests/auto/corelib/thread/qfuture/tst_qfuture.cpp +++ b/tests/auto/corelib/thread/qfuture/tst_qfuture.cpp @@ -36,6 +36,7 @@ #include <qresultstore.h> #include <qthreadpool.h> #include <qexception.h> +#include <qrandom.h> #include <private/qfutureinterface_p.h> // COM interface macro. @@ -1456,7 +1457,7 @@ void tst_QFuture::nonGlobalThreadPool() void run() override { - const int ms = 100 + (qrand() % 100 - 100/2); + const int ms = 100 + (QRandomGenerator::global()->bounded(100) - 100/2); QThread::msleep(ms); reportResult(Answer); reportFinished(); |