aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4mathobject.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2017-09-21 12:23:48 -0700
committerLars Knoll <lars.knoll@qt.io>2017-12-05 10:05:01 +0000
commit14599af2f27292710e68a6e500aa9f9cf3a30789 (patch)
tree024e6545c682796f64159112988dede312b68f00 /src/qml/jsruntime/qv4mathobject.cpp
parent1dbe0acecbc286b6df25fe2a9c4a373fa0d6b11e (diff)
Update to new QRandomGenerator API
To get latest qtbase dev integrated in qt5 dev again without qtdeclarative 5.10->dev merge. Change-Id: I6905649aca2b06302df8cee2f660f1f92398d36a Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io> (cherry picked from commit ee00fa01dc41deaaedfa0d1d5cc6cd750bfe75f4) Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4mathobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4mathobject.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4mathobject.cpp b/src/qml/jsruntime/qv4mathobject.cpp
index 252ec345d9..0c18d908de 100644
--- a/src/qml/jsruntime/qv4mathobject.cpp
+++ b/src/qml/jsruntime/qv4mathobject.cpp
@@ -277,7 +277,7 @@ ReturnedValue MathObject::method_pow(const FunctionObject *, const Value *, cons
ReturnedValue MathObject::method_random(const FunctionObject *, const Value *, const Value *, int)
{
- RETURN_RESULT(Encode(QRandomGenerator::getReal()));
+ RETURN_RESULT(Encode(QRandomGenerator::global()->generateDouble()));
}
ReturnedValue MathObject::method_round(const FunctionObject *, const Value *, const Value *argv, int argc)