diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-09-25 12:24:36 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-28 13:33:24 +0200 |
commit | cf2a253f2f60c9f0c61682527d80143e72b355d4 (patch) | |
tree | d60e8be50437e6f15513e25155817b902a2062c7 /src/qml/jsruntime/qv4script.cpp | |
parent | 7872b380063d0497ba62fecfdc92148f1ea947af (diff) |
Move Value::fromBool, ... to a new Primitive class
This will simplify finding the remaining direct usages of
QV4::Value that need fixing.
Change-Id: I223099727436d5748027c84c53d9dfc4028e38ed
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4script.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4script.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4script.cpp b/src/qml/jsruntime/qv4script.cpp index 7a19e385a1..d358c8948c 100644 --- a/src/qml/jsruntime/qv4script.cpp +++ b/src/qml/jsruntime/qv4script.cpp @@ -69,7 +69,7 @@ QmlBindingWrapper::QmlBindingWrapper(ExecutionContext *scope, Function *f, Objec function->compilationUnit->ref(); usesArgumentsObject = function->usesArgumentsObject(); needsActivation = function->needsActivation(); - defineReadonlyProperty(scope->engine->id_length, Value::fromInt32(1)); + defineReadonlyProperty(scope->engine->id_length, Primitive::fromInt32(1)); qmlContext = scope->engine->current->newQmlContext(this, qml); scope->engine->popContext(); @@ -83,7 +83,7 @@ QmlBindingWrapper::QmlBindingWrapper(ExecutionContext *scope, Object *qml) function = 0; usesArgumentsObject = false; needsActivation = false; - defineReadonlyProperty(scope->engine->id_length, Value::fromInt32(1)); + defineReadonlyProperty(scope->engine->id_length, Primitive::fromInt32(1)); qmlContext = scope->engine->current->newQmlContext(this, qml); scope->engine->popContext(); @@ -97,7 +97,7 @@ ReturnedValue QmlBindingWrapper::call(Managed *that, CallData *) Q_ASSERT(This->function); CallContext *ctx = This->qmlContext; - std::fill(ctx->locals, ctx->locals + ctx->function->varCount, Value::undefinedValue()); + std::fill(ctx->locals, ctx->locals + ctx->function->varCount, Primitive::undefinedValue()); engine->pushContext(ctx); ScopedValue result(scope, This->function->code(ctx, This->function->codeData)); engine->popContext(); @@ -252,7 +252,7 @@ ReturnedValue Script::run() ScopedObject qmlObj(valueScope, qml.value()); FunctionObject *f = new (engine->memoryManager) QmlBindingWrapper(scope, vmFunction, qmlObj.getPointer()); ScopedCallData callData(valueScope, 0); - callData->thisObject = Value::undefinedValue(); + callData->thisObject = Primitive::undefinedValue(); return f->call(callData); } } |