aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/doc
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2017-06-12 15:28:13 -0700
committerSimon Hausmann <simon.hausmann@qt.io>2017-08-23 04:47:59 +0000
commit2b7b24a0e039a18db8ab23475fbab44718f758a2 (patch)
tree0cfb916871a7e48d843dcd371d723a7d6083f2a6 /src/qml/doc
parent46ed14da325c6c0382c0bc54cacc347d2d7f2b0a (diff)
Use QRandomGenerator instead of q?rand
Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5285d43f4afbf Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/doc')
-rw-r--r--src/qml/doc/src/cppintegration/definetypes.qdoc3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/qml/doc/src/cppintegration/definetypes.qdoc b/src/qml/doc/src/cppintegration/definetypes.qdoc
index 1ce00c6ad0..91f916c699 100644
--- a/src/qml/doc/src/cppintegration/definetypes.qdoc
+++ b/src/qml/doc/src/cppintegration/definetypes.qdoc
@@ -606,7 +606,6 @@ public:
RandomNumberGenerator(QObject *parent)
: QObject(parent), m_maxValue(100)
{
- qsrand(QDateTime::currentMSecsSinceEpoch() / 1000);
QObject::connect(&m_timer, SIGNAL(timeout()), SLOT(updateProperty()));
m_timer.start(500);
}
@@ -621,7 +620,7 @@ signals:
private slots:
void updateProperty() {
- m_targetProperty.write(qrand() % m_maxValue);
+ m_targetProperty.write(QRandomGenerator::bounded(m_maxValue));
}
private: