aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
diff options
context:
space:
mode:
authorOleg Shparber <trollixx@gmail.com>2014-12-31 10:34:52 -0800
committerOleg Shparber <trollixx@gmail.com>2015-01-02 21:29:09 +0100
commit29c0102adb8b800f4947e4e7962ca414fe576866 (patch)
tree7e5e35bc688f05337f080315336cd80864144620 /src/qml
parentd0db6dc2b7ceb04f2bc1815ac3216a09add8fd3d (diff)
Use QV4::ScopedString typedef instead of actual type
Change-Id: I64ecbf6cea463387a70e909ecc5f9165d22a7b0f Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml')
-rw-r--r--src/qml/jsruntime/qv4engine.cpp4
-rw-r--r--src/qml/jsruntime/qv4globalobject.cpp2
-rw-r--r--src/qml/jsruntime/qv4lookup.cpp2
-rw-r--r--src/qml/jsruntime/qv4object.cpp2
-rw-r--r--src/qml/jsruntime/qv4objectproto.cpp12
-rw-r--r--src/qml/qml/qqmlcontextwrapper.cpp2
-rw-r--r--src/qml/qml/qqmlvaluetypewrapper.cpp2
-rw-r--r--src/qml/types/qqmllistmodel.cpp4
8 files changed, 15 insertions, 15 deletions
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp
index fc004f5de5..e1e57f9c2d 100644
--- a/src/qml/jsruntime/qv4engine.cpp
+++ b/src/qml/jsruntime/qv4engine.cpp
@@ -456,7 +456,7 @@ ExecutionEngine::ExecutionEngine(EvalISelFactory *factory)
globalObject()->defineDefaultProperty(QStringLiteral("escape"), GlobalFunctions::method_escape, 1);
globalObject()->defineDefaultProperty(QStringLiteral("unescape"), GlobalFunctions::method_unescape, 1);
- Scoped<String> name(scope, newString(QStringLiteral("thrower")));
+ ScopedString name(scope, newString(QStringLiteral("thrower")));
thrower = BuiltinFunction::create(global, name, ::throwTypeError);
}
@@ -1085,7 +1085,7 @@ ReturnedValue ExecutionEngine::throwTypeError(const QString &message)
ReturnedValue ExecutionEngine::throwReferenceError(const ValueRef value)
{
Scope scope(this);
- Scoped<String> s(scope, value->toString(this));
+ ScopedString s(scope, value->toString(this));
QString msg = s->toQString() + QStringLiteral(" is not defined");
Scoped<Object> error(scope, newReferenceErrorObject(msg));
return throwError(error);
diff --git a/src/qml/jsruntime/qv4globalobject.cpp b/src/qml/jsruntime/qv4globalobject.cpp
index a6f1b43e0d..c9d61f7c03 100644
--- a/src/qml/jsruntime/qv4globalobject.cpp
+++ b/src/qml/jsruntime/qv4globalobject.cpp
@@ -516,7 +516,7 @@ ReturnedValue GlobalFunctions::method_parseFloat(CallContext *ctx)
Scope scope(ctx);
// [15.1.2.3] step by step:
- Scoped<String> inputString(scope, ctx->argument(0), Scoped<String>::Convert);
+ ScopedString inputString(scope, ctx->argument(0), ScopedString::Convert);
if (scope.engine->hasException)
return Encode::undefined();
diff --git a/src/qml/jsruntime/qv4lookup.cpp b/src/qml/jsruntime/qv4lookup.cpp
index abb769b171..8a9a6c39e1 100644
--- a/src/qml/jsruntime/qv4lookup.cpp
+++ b/src/qml/jsruntime/qv4lookup.cpp
@@ -602,7 +602,7 @@ ReturnedValue Lookup::globalGetterGeneric(Lookup *l, ExecutionEngine *engine)
}
}
Scope scope(engine);
- Scoped<String> n(scope, engine->currentContext()->compilationUnit->runtimeStrings[l->nameIndex]);
+ ScopedString n(scope, engine->currentContext()->compilationUnit->runtimeStrings[l->nameIndex]);
return engine->throwReferenceError(n);
}
diff --git a/src/qml/jsruntime/qv4object.cpp b/src/qml/jsruntime/qv4object.cpp
index eb44d4a1af..9f53a9b2d5 100644
--- a/src/qml/jsruntime/qv4object.cpp
+++ b/src/qml/jsruntime/qv4object.cpp
@@ -156,7 +156,7 @@ void Object::defineAccessorProperty(const QString &name, ReturnedValue (*getter)
{
ExecutionEngine *e = engine();
Scope scope(e);
- Scoped<String> s(scope, e->newIdentifier(name));
+ ScopedString s(scope, e->newIdentifier(name));
defineAccessorProperty(s, getter, setter);
}
diff --git a/src/qml/jsruntime/qv4objectproto.cpp b/src/qml/jsruntime/qv4objectproto.cpp
index 31e65d4e43..3a6ddee55b 100644
--- a/src/qml/jsruntime/qv4objectproto.cpp
+++ b/src/qml/jsruntime/qv4objectproto.cpp
@@ -137,7 +137,7 @@ ReturnedValue ObjectPrototype::method_getOwnPropertyDescriptor(CallContext *ctx)
Scoped<ArgumentsObject>(scope, O)->fullyCreate();
ScopedValue v(scope, ctx->argument(1));
- Scoped<String> name(scope, v->toString(scope.engine));
+ ScopedString name(scope, v->toString(scope.engine));
if (scope.hasException())
return Encode::undefined();
PropertyAttributes attrs;
@@ -181,7 +181,7 @@ ReturnedValue ObjectPrototype::method_defineProperty(CallContext *ctx)
if (!O)
return ctx->engine()->throwTypeError();
- Scoped<String> name(scope, ctx->argument(1), Scoped<String>::Convert);
+ ScopedString name(scope, ctx->argument(1), ScopedString::Convert);
if (scope.engine->hasException)
return Encode::undefined();
@@ -425,7 +425,7 @@ ReturnedValue ObjectPrototype::method_valueOf(CallContext *ctx)
ReturnedValue ObjectPrototype::method_hasOwnProperty(CallContext *ctx)
{
Scope scope(ctx);
- Scoped<String> P(scope, ctx->argument(0), Scoped<String>::Convert);
+ ScopedString P(scope, ctx->argument(0), ScopedString::Convert);
if (scope.engine->hasException)
return Encode::undefined();
Scoped<Object> O(scope, ctx->d()->callData->thisObject, Scoped<Object>::Convert);
@@ -459,7 +459,7 @@ ReturnedValue ObjectPrototype::method_isPrototypeOf(CallContext *ctx)
ReturnedValue ObjectPrototype::method_propertyIsEnumerable(CallContext *ctx)
{
Scope scope(ctx);
- Scoped<String> p(scope, ctx->argument(0), Scoped<String>::Convert);
+ ScopedString p(scope, ctx->argument(0), ScopedString::Convert);
if (scope.engine->hasException)
return Encode::undefined();
@@ -481,7 +481,7 @@ ReturnedValue ObjectPrototype::method_defineGetter(CallContext *ctx)
if (!f)
return ctx->engine()->throwTypeError();
- Scoped<String> prop(scope, ctx->argument(0), Scoped<String>::Convert);
+ ScopedString prop(scope, ctx->argument(0), ScopedString::Convert);
if (scope.engine->hasException)
return Encode::undefined();
@@ -509,7 +509,7 @@ ReturnedValue ObjectPrototype::method_defineSetter(CallContext *ctx)
if (!f)
return ctx->engine()->throwTypeError();
- Scoped<String> prop(scope, ctx->argument(0), Scoped<String>::Convert);
+ ScopedString prop(scope, ctx->argument(0), ScopedString::Convert);
if (scope.engine->hasException)
return Encode::undefined();
diff --git a/src/qml/qml/qqmlcontextwrapper.cpp b/src/qml/qml/qqmlcontextwrapper.cpp
index 0b63849e54..712cba74ec 100644
--- a/src/qml/qml/qqmlcontextwrapper.cpp
+++ b/src/qml/qml/qqmlcontextwrapper.cpp
@@ -288,7 +288,7 @@ void QmlContextWrapper::put(Managed *m, String *name, const ValueRef value)
if (wrapper && wrapper->d()->readOnly) {
QString error = QLatin1String("Invalid write to global property \"") + name->toQString() +
QLatin1Char('"');
- Scoped<String> e(scope, v4->currentContext()->engine->newString(error));
+ ScopedString e(scope, v4->currentContext()->engine->newString(error));
v4->throwError(e);
return;
}
diff --git a/src/qml/qml/qqmlvaluetypewrapper.cpp b/src/qml/qml/qqmlvaluetypewrapper.cpp
index a7c4d6ca15..222ab0aa31 100644
--- a/src/qml/qml/qqmlvaluetypewrapper.cpp
+++ b/src/qml/qml/qqmlvaluetypewrapper.cpp
@@ -363,7 +363,7 @@ void QQmlValueTypeWrapper::put(Managed *m, String *name, const ValueRef value)
if (!f->bindingKeyFlag()) {
// assigning a JS function to a non-var-property is not allowed.
QString error = QStringLiteral("Cannot assign JavaScript function to value-type property");
- Scoped<String> e(scope, v4->newString(error));
+ ScopedString e(scope, v4->newString(error));
v4->throwError(e);
return;
}
diff --git a/src/qml/types/qqmllistmodel.cpp b/src/qml/types/qqmllistmodel.cpp
index bac6aedcb2..cf9ee747a9 100644
--- a/src/qml/types/qqmllistmodel.cpp
+++ b/src/qml/types/qqmllistmodel.cpp
@@ -410,7 +410,7 @@ void ListModel::set(int elementIndex, QV4::Object *object, QVector<int> *roles,
QV4::ScopedObject o(scope);
QV4::ObjectIterator it(scope, object, QV4::ObjectIterator::WithProtoChain|QV4::ObjectIterator::EnumerableOnly);
- QV4::Scoped<QV4::String> propertyName(scope);
+ QV4::ScopedString propertyName(scope);
QV4::ScopedValue propertyValue(scope);
QV4::ScopedString s(scope);
QV4::ScopedArrayObject a(scope);
@@ -486,7 +486,7 @@ void ListModel::set(int elementIndex, QV4::Object *object, QV8Engine *eng)
QV4::Scope scope(v4);
QV4::ObjectIterator it(scope, object, QV4::ObjectIterator::WithProtoChain|QV4::ObjectIterator::EnumerableOnly);
- QV4::Scoped<QV4::String> propertyName(scope);
+ QV4::ScopedString propertyName(scope);
QV4::ScopedValue propertyValue(scope);
QV4::ScopedObject o(scope);
QV4::ScopedArrayObject a(scope);