mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Replace deprecated qrand
This commit is contained in:
parent
a7f6fed937
commit
61cce5882e
1 changed files with 2 additions and 3 deletions
|
@ -22,6 +22,7 @@
|
|||
#include <QString>
|
||||
#include <QTime>
|
||||
#include <QUrl>
|
||||
#include <QRandomGenerator>
|
||||
|
||||
#include "ScriptEngineLogging.h"
|
||||
|
||||
|
@ -102,9 +103,7 @@ QString GooglePolyScriptingInterface::getModelInfo(const QString& input) {
|
|||
}
|
||||
|
||||
int GooglePolyScriptingInterface::getRandIntInRange(int length) {
|
||||
QTime time = QTime::currentTime();
|
||||
qsrand((uint)time.msec());
|
||||
return qrand() % length;
|
||||
return QRandomGenerator::global()->bounded(length);
|
||||
}
|
||||
|
||||
QUrl GooglePolyScriptingInterface::formatURLQuery(const QString& keyword, const QString& category, const QString& format) {
|
||||
|
|
Loading…
Reference in a new issue