summaryrefslogtreecommitdiffstats
path: root/examples/widgets/animation/stickman/lifecycle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/animation/stickman/lifecycle.cpp')
-rw-r--r--examples/widgets/animation/stickman/lifecycle.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/examples/widgets/animation/stickman/lifecycle.cpp b/examples/widgets/animation/stickman/lifecycle.cpp
index 253af22b2d..dbe9a299b4 100644
--- a/examples/widgets/animation/stickman/lifecycle.cpp
+++ b/examples/widgets/animation/stickman/lifecycle.cpp
@@ -91,13 +91,12 @@ public:
: QEventTransition(this, QEvent::Timer)
{
setTargetState(target);
- qsrand((uint)QDateTime::currentSecsSinceEpoch());
startTimer(1000);
}
bool eventTest(QEvent *e) override
{
- return QEventTransition::eventTest(e) && ((qrand() % 50) == 0);
+ return QEventTransition::eventTest(e) && QRandomGenerator::global()->bounded(50) == 0;
}
};
//! [4]