summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2017-06-12 16:09:14 -0700
committerThiago Macieira <thiago.macieira@intel.com>2017-06-30 06:23:22 +0000
commit2d68492004bf4ba49cf58c9bd72706cb282cf59b (patch)
tree48914a84e53e223df335fe5652de3de5a1ab61a9
parent7efef7478b60f6aeb7babb0663234cf8dcb8a265 (diff)
downloadqtwebkit-examples-2d68492004bf4ba49cf58c9bd72706cb282cf59b.tar.gz
Use QRandomGenerator instead of q?randHEADdev
Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5285d43f4afbf Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r--examples/webkitwidgets/scroller/wheel/main.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/webkitwidgets/scroller/wheel/main.cpp b/examples/webkitwidgets/scroller/wheel/main.cpp
index a685d50..11fad08 100644
--- a/examples/webkitwidgets/scroller/wheel/main.cpp
+++ b/examples/webkitwidgets/scroller/wheel/main.cpp
@@ -90,9 +90,9 @@ public:
private slots:
void rotateRandom()
{
- m_wheel1->scrollTo(m_wheel1->currentIndex() + (qrand() % 200));
- m_wheel2->scrollTo(m_wheel2->currentIndex() + (qrand() % 200));
- m_wheel3->scrollTo(m_wheel3->currentIndex() + (qrand() % 200));
+ m_wheel1->scrollTo(m_wheel1->currentIndex() + QRandomGenerator::bounded(200));
+ m_wheel2->scrollTo(m_wheel2->currentIndex() + QRandomGenerator::bounded(200));
+ m_wheel3->scrollTo(m_wheel3->currentIndex() + QRandomGenerator::bounded(200));
}
private: