summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/painting/qpathclipper/tst_qpathclipper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/gui/painting/qpathclipper/tst_qpathclipper.cpp')
-rw-r--r--tests/auto/gui/painting/qpathclipper/tst_qpathclipper.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/auto/gui/painting/qpathclipper/tst_qpathclipper.cpp b/tests/auto/gui/painting/qpathclipper/tst_qpathclipper.cpp
index 14ba9c5c84..93035af7d3 100644
--- a/tests/auto/gui/painting/qpathclipper/tst_qpathclipper.cpp
+++ b/tests/auto/gui/painting/qpathclipper/tst_qpathclipper.cpp
@@ -35,6 +35,7 @@
#include <qpolygon.h>
#include <qdebug.h>
#include <qpainter.h>
+#include <qrandom.h>
#include <math.h>
@@ -423,8 +424,8 @@ void tst_QPathClipper::clip()
static inline QPointF randomPointInRect(const QRectF &rect)
{
- qreal rx = qrand() / (RAND_MAX + 1.);
- qreal ry = qrand() / (RAND_MAX + 1.);
+ qreal rx = QRandomGenerator::global()->bounded(1.0);
+ qreal ry = QRandomGenerator::global()->bounded(1.0);
return QPointF(rect.left() + rx * rect.width(),
rect.top() + ry * rect.height());