diff options
-rw-r--r-- | src/imports/localstorage/plugin.cpp | 6 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4engine.cpp | 4 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4globalobject.cpp | 2 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4lookup.cpp | 2 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4object.cpp | 2 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4objectproto.cpp | 12 | ||||
-rw-r--r-- | src/qml/qml/qqmlcontextwrapper.cpp | 2 | ||||
-rw-r--r-- | src/qml/qml/qqmlvaluetypewrapper.cpp | 2 | ||||
-rw-r--r-- | src/qml/types/qqmllistmodel.cpp | 4 | ||||
-rw-r--r-- | src/quick/items/context2d/qquickcontext2d.cpp | 6 | ||||
-rw-r--r-- | tests/auto/qml/qv4debugger/tst_qv4debugger.cpp | 2 |
11 files changed, 22 insertions, 22 deletions
diff --git a/src/imports/localstorage/plugin.cpp b/src/imports/localstorage/plugin.cpp index 8ee2742198..95e4be0c98 100644 --- a/src/imports/localstorage/plugin.cpp +++ b/src/imports/localstorage/plugin.cpp @@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE #define V4THROW_SQL(error, desc) { \ - QV4::Scoped<String> v(scope, scope.engine->newString(desc)); \ + QV4::ScopedString v(scope, scope.engine->newString(desc)); \ QV4::Scoped<Object> ex(scope, scope.engine->newErrorObject(v)); \ ex->put(QV4::ScopedString(scope, scope.engine->newIdentifier(QStringLiteral("code"))).getPointer(), QV4::ScopedValue(scope, Primitive::fromInt32(error))); \ ctx->engine()->throwError(ex); \ @@ -65,7 +65,7 @@ QT_BEGIN_NAMESPACE } #define V4THROW_SQL2(error, desc) { \ - QV4::Scoped<String> v(scope, scope.engine->newString(desc)); \ + QV4::ScopedString v(scope, scope.engine->newString(desc)); \ QV4::Scoped<Object> ex(scope, scope.engine->newErrorObject(v)); \ ex->put(QV4::ScopedString(scope, scope.engine->newIdentifier(QStringLiteral("code"))).getPointer(), QV4::ScopedValue(scope, Primitive::fromInt32(error))); \ args->setReturnValue(ctx->engine()->throwError(ex)); \ @@ -73,7 +73,7 @@ QT_BEGIN_NAMESPACE } #define V4THROW_REFERENCE(string) { \ - QV4::Scoped<String> v(scope, scope.engine->newString(string)); \ + QV4::ScopedString v(scope, scope.engine->newString(string)); \ ctx->engine()->throwReferenceError(v); \ return Encode::undefined(); \ } 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); diff --git a/src/quick/items/context2d/qquickcontext2d.cpp b/src/quick/items/context2d/qquickcontext2d.cpp index a028055c3c..205cf74a67 100644 --- a/src/quick/items/context2d/qquickcontext2d.cpp +++ b/src/quick/items/context2d/qquickcontext2d.cpp @@ -2627,7 +2627,7 @@ QV4::ReturnedValue QQuickJSContext2D::method_set_font(QV4::CallContext *ctx) QV4::Scoped<QQuickJSContext2D> r(scope, ctx->d()->callData->thisObject); CHECK_CONTEXT_SETTER(r) - QV4::Scoped<QV4::String> s(scope, ctx->argument(0), QV4::Scoped<QV4::String>::Convert); + QV4::ScopedString s(scope, ctx->argument(0), QV4::ScopedString::Convert); if (scope.engine->hasException) return QV4::Encode::undefined(); QFont font = qt_font_from_string(s->toQString(), r->d()->context->state.font); @@ -2679,7 +2679,7 @@ QV4::ReturnedValue QQuickJSContext2D::method_set_textAlign(QV4::CallContext *ctx QV4::Scoped<QQuickJSContext2D> r(scope, ctx->d()->callData->thisObject); CHECK_CONTEXT_SETTER(r) - QV4::Scoped<QV4::String> s(scope, ctx->argument(0), QV4::Scoped<QV4::String>::Convert); + QV4::ScopedString s(scope, ctx->argument(0), QV4::ScopedString::Convert); if (scope.engine->hasException) return QV4::Encode::undefined(); QString textAlign = s->toQString(); @@ -2746,7 +2746,7 @@ QV4::ReturnedValue QQuickJSContext2D::method_set_textBaseline(QV4::CallContext * QV4::Scope scope(ctx); QV4::Scoped<QQuickJSContext2D> r(scope, ctx->d()->callData->thisObject); CHECK_CONTEXT_SETTER(r) - QV4::Scoped<QV4::String> s(scope, ctx->argument(0), QV4::Scoped<QV4::String>::Convert); + QV4::ScopedString s(scope, ctx->argument(0), QV4::ScopedString::Convert); if (scope.engine->hasException) return QV4::Encode::undefined(); QString textBaseline = s->toQString(); diff --git a/tests/auto/qml/qv4debugger/tst_qv4debugger.cpp b/tests/auto/qml/qv4debugger/tst_qv4debugger.cpp index 38024daad0..70e6739aff 100644 --- a/tests/auto/qml/qv4debugger/tst_qv4debugger.cpp +++ b/tests/auto/qml/qv4debugger/tst_qv4debugger.cpp @@ -82,7 +82,7 @@ public: QV4::ExecutionEngine *v4 = v4Engine(); QV4::Scope scope(v4); - QV4::Scoped<QV4::String> name(scope, v4->newString(functionName)); + QV4::ScopedString name(scope, v4->newString(functionName)); QV4::ScopedContext ctx(scope, v4->rootContext()); QV4::ScopedValue function(scope, BuiltinFunction::create(ctx, name, injectedFunction)); v4->globalObject()->put(name, function); |