summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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: