aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4include.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-09-25 12:24:36 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-28 13:33:24 +0200
commitcf2a253f2f60c9f0c61682527d80143e72b355d4 (patch)
treed60e8be50437e6f15513e25155817b902a2062c7 /src/qml/jsruntime/qv4include.cpp
parent7872b380063d0497ba62fecfdc92148f1ea947af (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/qv4include.cpp')
-rw-r--r--src/qml/jsruntime/qv4include.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/qml/jsruntime/qv4include.cpp b/src/qml/jsruntime/qv4include.cpp
index bde9c23e6b..b0b5e38ea2 100644
--- a/src/qml/jsruntime/qv4include.cpp
+++ b/src/qml/jsruntime/qv4include.cpp
@@ -90,11 +90,11 @@ QV4::ReturnedValue QV4Include::resultValue(QV4::ExecutionEngine *v4, Status stat
QV4::ScopedObject o(scope, v4->newObject());
QV4::ScopedString s(scope);
QV4::ScopedValue v(scope);
- o->put((s = v4->newString("OK")), (v = QV4::Value::fromInt32(Ok)));
- o->put((s = v4->newString("LOADING")), (v = QV4::Value::fromInt32(Loading)));
- o->put((s = v4->newString("NETWORK_ERROR")), (v = QV4::Value::fromInt32(NetworkError)));
- o->put((s = v4->newString("EXCEPTION")), (v = QV4::Value::fromInt32(Exception)));
- o->put((s = v4->newString("status")), (v = QV4::Value::fromInt32(status)));
+ o->put((s = v4->newString("OK")), (v = QV4::Primitive::fromInt32(Ok)));
+ o->put((s = v4->newString("LOADING")), (v = QV4::Primitive::fromInt32(Loading)));
+ o->put((s = v4->newString("NETWORK_ERROR")), (v = QV4::Primitive::fromInt32(NetworkError)));
+ o->put((s = v4->newString("EXCEPTION")), (v = QV4::Primitive::fromInt32(Exception)));
+ o->put((s = v4->newString("status")), (v = QV4::Primitive::fromInt32(status)));
return o.asReturnedValue();
}
@@ -158,15 +158,15 @@ void QV4Include::finished()
try {
script.parse();
script.run();
- resultObj->put(status, QV4::ScopedValue(scope, QV4::Value::fromInt32(Ok)));
+ resultObj->put(status, QV4::ScopedValue(scope, QV4::Primitive::fromInt32(Ok)));
} catch (QV4::Exception &e) {
e.accept(ctx);
- resultObj->put(status, QV4::ScopedValue(scope, QV4::Value::fromInt32(Exception)));
+ resultObj->put(status, QV4::ScopedValue(scope, QV4::Primitive::fromInt32(Exception)));
QV4::ScopedValue ex(scope, e.value());
resultObj->put(QV4::ScopedString(scope, v4->newString("exception")), ex);
}
} else {
- resultObj->put(QV4::ScopedString(scope, v4->newString("status")), QV4::ScopedValue(scope, QV4::Value::fromInt32(NetworkError)));
+ resultObj->put(QV4::ScopedString(scope, v4->newString("status")), QV4::ScopedValue(scope, QV4::Primitive::fromInt32(NetworkError)));
}
QV4::ScopedValue cb(scope, m_callbackFunction.value());
@@ -194,7 +194,7 @@ QV4::ReturnedValue QV4Include::method_include(QV4::SimpleCallContext *ctx)
QUrl url(ctx->engine->resolvedUrl(ctx->callData->args[0].toQStringNoThrow()));
- QV4::Value callbackFunction = QV4::Value::undefinedValue();
+ QV4::Value callbackFunction = QV4::Primitive::undefinedValue();
if (ctx->callData->argc >= 2 && ctx->callData->args[1].asFunctionObject())
callbackFunction = ctx->callData->args[1];