aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4numberobject.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>2016-04-12 18:15:52 +0200
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>2016-04-13 09:19:18 +0200
commit6e6079031cf44149be4ca1f05547b4c03e505290 (patch)
treed16fb11a3cdb50f367fea645359538523ab83620 /src/qml/jsruntime/qv4numberobject.cpp
parent38d2d6ede6722b0fb86ee6723bbfbb2b063c4d6b (diff)
parent8ca22ca7eb5216513410651411fd2e0f07e50f34 (diff)
Merge remote-tracking branch 'origin/dev' into wip/scenegraphng
Diffstat (limited to 'src/qml/jsruntime/qv4numberobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4numberobject.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4numberobject.cpp b/src/qml/jsruntime/qv4numberobject.cpp
index 5cf7dbebd8..ab3e03b183 100644
--- a/src/qml/jsruntime/qv4numberobject.cpp
+++ b/src/qml/jsruntime/qv4numberobject.cpp
@@ -95,7 +95,7 @@ void NumberPrototype::init(ExecutionEngine *engine, Object *ctor)
ctor->defineReadonlyProperty(engine->id_prototype(), (o = this));
ctor->defineReadonlyProperty(engine->id_length(), Primitive::fromInt32(1));
- ctor->defineReadonlyProperty(QStringLiteral("NaN"), Primitive::fromDouble(qQNaN()));
+ ctor->defineReadonlyProperty(QStringLiteral("NaN"), Primitive::fromDouble(qt_qnan()));
ctor->defineReadonlyProperty(QStringLiteral("NEGATIVE_INFINITY"), Primitive::fromDouble(-qInf()));
ctor->defineReadonlyProperty(QStringLiteral("POSITIVE_INFINITY"), Primitive::fromDouble(qInf()));
ctor->defineReadonlyProperty(QStringLiteral("MAX_VALUE"), Primitive::fromDouble(1.7976931348623158e+308));
@@ -149,7 +149,7 @@ ReturnedValue NumberPrototype::method_toString(CallContext *ctx)
if (std::isnan(num)) {
return scope.engine->newString(QStringLiteral("NaN"))->asReturnedValue();
- } else if (qIsInf(num)) {
+ } else if (qt_is_inf(num)) {
return scope.engine->newString(QLatin1String(num < 0 ? "-Infinity" : "Infinity"))->asReturnedValue();
}
@@ -223,7 +223,7 @@ ReturnedValue NumberPrototype::method_toFixed(CallContext *ctx)
QString str;
if (std::isnan(v))
str = QStringLiteral("NaN");
- else if (qIsInf(v))
+ else if (qt_is_inf(v))
str = QString::fromLatin1(v < 0 ? "-Infinity" : "Infinity");
else if (v < 1.e21)
str = NumberLocale::instance()->toString(v, 'f', int(fdigits));