summaryrefslogtreecommitdiffstats
path: root/tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp')
-rw-r--r--tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp b/tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp
index 96656a6dff..2d7c0c2f64 100644
--- a/tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp
+++ b/tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp
@@ -2204,13 +2204,13 @@ InstanceCounter slowMap(const InstanceCounter &in)
InstanceCounter fastMap(const InstanceCounter &in)
{
- QTest::qSleep(rand() % 2 + 1);
+ QTest::qSleep(QRandomGenerator::global()->bounded(2) + 1);
return in;
}
void slowReduce(int &result, const InstanceCounter&)
{
- QTest::qSleep(rand() % 4 + 1);
+ QTest::qSleep(QRandomGenerator::global()->bounded(4) + 1);
++result;
}