aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4numberobject.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-09-18 12:31:55 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-22 01:06:20 +0200
commit3c325823a778e1a6542eb746e047d5d7bfb43566 (patch)
tree66b22c22c32fd719d0bdb0018cc1da5403d69180 /src/qml/jsruntime/qv4numberobject.cpp
parent50624234f2c0b6d3b0985edb8ff0b6aad5cad761 (diff)
Cleanup Object::define*Property API
Change-Id: I99125908a9bc1d41a2642c409af9704def7a0832 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4numberobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4numberobject.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/qml/jsruntime/qv4numberobject.cpp b/src/qml/jsruntime/qv4numberobject.cpp
index b9b64cf534..eb64b92aa2 100644
--- a/src/qml/jsruntime/qv4numberobject.cpp
+++ b/src/qml/jsruntime/qv4numberobject.cpp
@@ -68,32 +68,32 @@ ReturnedValue NumberCtor::call(Managed *, CallData *callData)
return Value::fromDouble(dbl).asReturnedValue();
}
-void NumberPrototype::init(ExecutionContext *ctx, const Value &ctor)
+void NumberPrototype::init(ExecutionEngine *engine, const Value &ctor)
{
- ctor.objectValue()->defineReadonlyProperty(ctx->engine->id_prototype, Value::fromObject(this));
- ctor.objectValue()->defineReadonlyProperty(ctx->engine->id_length, Value::fromInt32(1));
+ ctor.objectValue()->defineReadonlyProperty(engine->id_prototype, Value::fromObject(this));
+ ctor.objectValue()->defineReadonlyProperty(engine->id_length, Value::fromInt32(1));
- ctor.objectValue()->defineReadonlyProperty(ctx->engine, QStringLiteral("NaN"), Value::fromDouble(qSNaN()));
- ctor.objectValue()->defineReadonlyProperty(ctx->engine, QStringLiteral("NEGATIVE_INFINITY"), Value::fromDouble(-qInf()));
- ctor.objectValue()->defineReadonlyProperty(ctx->engine, QStringLiteral("POSITIVE_INFINITY"), Value::fromDouble(qInf()));
- ctor.objectValue()->defineReadonlyProperty(ctx->engine, QStringLiteral("MAX_VALUE"), Value::fromDouble(1.7976931348623158e+308));
+ ctor.objectValue()->defineReadonlyProperty(QStringLiteral("NaN"), Value::fromDouble(qSNaN()));
+ ctor.objectValue()->defineReadonlyProperty(QStringLiteral("NEGATIVE_INFINITY"), Value::fromDouble(-qInf()));
+ ctor.objectValue()->defineReadonlyProperty(QStringLiteral("POSITIVE_INFINITY"), Value::fromDouble(qInf()));
+ ctor.objectValue()->defineReadonlyProperty(QStringLiteral("MAX_VALUE"), Value::fromDouble(1.7976931348623158e+308));
#ifdef __INTEL_COMPILER
# pragma warning( push )
# pragma warning(disable: 239)
#endif
- ctor.objectValue()->defineReadonlyProperty(ctx->engine, QStringLiteral("MIN_VALUE"), Value::fromDouble(5e-324));
+ ctor.objectValue()->defineReadonlyProperty(QStringLiteral("MIN_VALUE"), Value::fromDouble(5e-324));
#ifdef __INTEL_COMPILER
# pragma warning( pop )
#endif
- defineDefaultProperty(ctx, QStringLiteral("constructor"), ctor);
- defineDefaultProperty(ctx, QStringLiteral("toString"), method_toString);
- defineDefaultProperty(ctx, QStringLiteral("toLocaleString"), method_toLocaleString);
- defineDefaultProperty(ctx, QStringLiteral("valueOf"), method_valueOf);
- defineDefaultProperty(ctx, QStringLiteral("toFixed"), method_toFixed, 1);
- defineDefaultProperty(ctx, QStringLiteral("toExponential"), method_toExponential);
- defineDefaultProperty(ctx, QStringLiteral("toPrecision"), method_toPrecision);
+ defineDefaultProperty(QStringLiteral("constructor"), ctor);
+ defineDefaultProperty(QStringLiteral("toString"), method_toString);
+ defineDefaultProperty(QStringLiteral("toLocaleString"), method_toLocaleString);
+ defineDefaultProperty(QStringLiteral("valueOf"), method_valueOf);
+ defineDefaultProperty(QStringLiteral("toFixed"), method_toFixed, 1);
+ defineDefaultProperty(QStringLiteral("toExponential"), method_toExponential);
+ defineDefaultProperty(QStringLiteral("toPrecision"), method_toPrecision);
}
inline Value thisNumberValue(ExecutionContext *ctx)