aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4include.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@digia.com>2013-11-01 12:38:32 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-04 02:16:04 +0100
commita79e400150e9d550cc4ddc0c0497778d8b78fe5d (patch)
tree5a66670d4c31aaf0d356042b6fe607728e237b5b /src/qml/jsruntime/qv4include.cpp
parentb5991ce2a61219bda5a7fa6e33f323158d1eb78b (diff)
Fix various compiler warnings in order to remove warn_off in the near future
Change-Id: Ic0492fbe31a1e134674bc6c20381f735dd6d5b7a 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 40f7b865d0..f156065125 100644
--- a/src/qml/jsruntime/qv4include.cpp
+++ b/src/qml/jsruntime/qv4include.cpp
@@ -89,11 +89,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::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)));
+ o->put((s = v4->newString(QStringLiteral("OK"))), (v = QV4::Primitive::fromInt32(Ok)));
+ o->put((s = v4->newString(QStringLiteral("LOADING"))), (v = QV4::Primitive::fromInt32(Loading)));
+ o->put((s = v4->newString(QStringLiteral("NETWORK_ERROR"))), (v = QV4::Primitive::fromInt32(NetworkError)));
+ o->put((s = v4->newString(QStringLiteral("EXCEPTION"))), (v = QV4::Primitive::fromInt32(Exception)));
+ o->put((s = v4->newString(QStringLiteral("status"))), (v = QV4::Primitive::fromInt32(status)));
return o.asReturnedValue();
}
@@ -154,19 +154,19 @@ void QV4Include::finished()
QV4::Script script(v4, qmlglobal, code, m_url.toString());
QV4::ExecutionContext *ctx = v4->current;
- QV4::ScopedString status(scope, v4->newString("status"));
+ QV4::ScopedString status(scope, v4->newString(QStringLiteral("status")));
script.parse();
if (!scope.engine->hasException)
script.run();
if (scope.engine->hasException) {
QV4::ScopedValue ex(scope, ctx->catchException());
resultObj->put(status, QV4::ScopedValue(scope, QV4::Primitive::fromInt32(Exception)));
- resultObj->put(QV4::ScopedString(scope, v4->newString("exception")), ex);
+ resultObj->put(QV4::ScopedString(scope, v4->newString(QStringLiteral("exception"))), ex);
} else {
resultObj->put(status, QV4::ScopedValue(scope, QV4::Primitive::fromInt32(Ok)));
}
} else {
- resultObj->put(QV4::ScopedString(scope, v4->newString("status")), QV4::ScopedValue(scope, QV4::Primitive::fromInt32(NetworkError)));
+ resultObj->put(QV4::ScopedString(scope, v4->newString(QStringLiteral("status"))), QV4::ScopedValue(scope, QV4::Primitive::fromInt32(NetworkError)));
}
QV4::ScopedValue cb(scope, m_callbackFunction.value());
@@ -227,7 +227,7 @@ QV4::ReturnedValue QV4Include::method_include(QV4::SimpleCallContext *ctx)
if (v4->hasException) {
QV4::ScopedValue ex(scope, ctx->catchException());
result = resultValue(v4, Exception);
- result->asObject()->put(QV4::ScopedString(scope, v4->newString("exception")), ex);
+ result->asObject()->put(QV4::ScopedString(scope, v4->newString(QStringLiteral("exception"))), ex);
} else {
result = resultValue(v4, Ok);
}