diff options
author | Oleg Shparber <[email protected]> | 2014-12-31 10:37:47 -0800 |
---|---|---|
committer | Oleg Shparber <[email protected]> | 2015-01-03 23:29:57 +0100 |
commit | 2fe82c505d09fdf372f1d4c5992a3a0b0dc98f33 (patch) | |
tree | 3961702f98d9f553e4c90e9eb074a8096c48ad05 /src | |
parent | 4a9ed3de7d92809cf575f245f55d4f422b4983c3 (diff) |
Use QV4::ScopedObject typedef instead of actual type
Change-Id: I0b68c534ea513a7c230b12114f6b42b069f9864b
Reviewed-by: Simon Hausmann <[email protected]>
Diffstat (limited to 'src')
31 files changed, 104 insertions, 104 deletions
diff --git a/src/imports/localstorage/plugin.cpp b/src/imports/localstorage/plugin.cpp index e281179a52..6df795fa9f 100644 --- a/src/imports/localstorage/plugin.cpp +++ b/src/imports/localstorage/plugin.cpp @@ -58,7 +58,7 @@ QT_BEGIN_NAMESPACE #define V4THROW_SQL(error, desc) { \ QV4::ScopedString v(scope, scope.engine->newString(desc)); \ - QV4::Scoped<Object> ex(scope, scope.engine->newErrorObject(v)); \ + QV4::ScopedObject 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); \ return Encode::undefined(); \ @@ -66,7 +66,7 @@ QT_BEGIN_NAMESPACE #define V4THROW_SQL2(error, desc) { \ QV4::ScopedString v(scope, scope.engine->newString(desc)); \ - QV4::Scoped<Object> ex(scope, scope.engine->newErrorObject(v)); \ + QV4::ScopedObject 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)); \ return; \ @@ -223,7 +223,7 @@ static ReturnedValue qmlsqldatabase_rows_index(QQmlSqlDatabaseWrapper *r, Execut if (r->d()->sqlQuery.at() == (int)index || r->d()->sqlQuery.seek(index)) { QSqlRecord record = r->d()->sqlQuery.record(); // XXX optimize - Scoped<Object> row(scope, v4->newObject()); + ScopedObject row(scope, v4->newObject()); for (int ii = 0; ii < record.count(); ++ii) { QVariant v = record.value(ii); ScopedString s(scope, v4->newIdentifier(record.fieldName(ii))); @@ -324,7 +324,7 @@ static ReturnedValue qmlsqldatabase_executeSql(CallContext *ctx) rows->d()->database = db; rows->d()->sqlQuery = query; - Scoped<Object> resultObject(scope, scope.engine->newObject()); + ScopedObject resultObject(scope, scope.engine->newObject()); result = resultObject.asReturnedValue(); // XXX optimize ScopedString s(scope); @@ -486,7 +486,7 @@ QQmlSqlDatabaseData::QQmlSqlDatabaseData(QV8Engine *engine) ExecutionEngine *v4 = QV8Engine::getV4(engine); Scope scope(v4); { - Scoped<Object> proto(scope, v4->newObject()); + ScopedObject proto(scope, v4->newObject()); proto->defineDefaultProperty(QStringLiteral("transaction"), qmlsqldatabase_transaction); proto->defineDefaultProperty(QStringLiteral("readTransaction"), qmlsqldatabase_read_transaction); proto->defineAccessorProperty(QStringLiteral("version"), qmlsqldatabase_version, 0); @@ -495,12 +495,12 @@ QQmlSqlDatabaseData::QQmlSqlDatabaseData(QV8Engine *engine) } { - Scoped<Object> proto(scope, v4->newObject()); + ScopedObject proto(scope, v4->newObject()); proto->defineDefaultProperty(QStringLiteral("executeSql"), qmlsqldatabase_executeSql); queryProto = proto; } { - Scoped<Object> proto(scope, v4->newObject()); + ScopedObject proto(scope, v4->newObject()); proto->defineDefaultProperty(QStringLiteral("item"), qmlsqldatabase_rows_item); proto->defineAccessorProperty(QStringLiteral("length"), qmlsqldatabase_rows_length, 0); proto->defineAccessorProperty(QStringLiteral("forwardOnly"), diff --git a/src/particles/qquickv4particledata.cpp b/src/particles/qquickv4particledata.cpp index bdb9273cd8..660bc7c11c 100644 --- a/src/particles/qquickv4particledata.cpp +++ b/src/particles/qquickv4particledata.cpp @@ -449,7 +449,7 @@ QV8ParticleDataDeletable::QV8ParticleDataDeletable(QV8Engine *engine) { QV4::ExecutionEngine *v4 = QV8Engine::getV4(engine); QV4::Scope scope(v4); - QV4::Scoped<QV4::Object> p(scope, v4->newObject()); + QV4::ScopedObject p(scope, v4->newObject()); p->defineDefaultProperty(QStringLiteral("discard"), particleData_discard); p->defineDefaultProperty(QStringLiteral("lifeLeft"), particleData_lifeLeft); diff --git a/src/qml/jsapi/qjsvalue.cpp b/src/qml/jsapi/qjsvalue.cpp index a18c544e14..4cfae02e9a 100644 --- a/src/qml/jsapi/qjsvalue.cpp +++ b/src/qml/jsapi/qjsvalue.cpp @@ -689,10 +689,10 @@ QJSValue QJSValue::prototype() const if (!engine) return QJSValue(); QV4::Scope scope(engine); - Scoped<Object> o(scope, d->value.asObject()); + ScopedObject o(scope, d->value.asObject()); if (!o) return QJSValue(); - Scoped<Object> p(scope, o->prototype()); + ScopedObject p(scope, o->prototype()); if (!p) return QJSValue(NullValue); return new QJSValuePrivate(o->internalClass()->engine, p); @@ -930,7 +930,7 @@ void QJSValue::setProperty(const QString& name, const QJSValue& value) return; Scope scope(engine); - Scoped<Object> o(scope, d->value); + ScopedObject o(scope, d->value); if (!o) return; @@ -972,7 +972,7 @@ void QJSValue::setProperty(quint32 arrayIndex, const QJSValue& value) return; Scope scope(engine); - Scoped<Object> o(scope, d->value); + ScopedObject o(scope, d->value); if (!o) return; diff --git a/src/qml/jsruntime/qv4arrayobject.cpp b/src/qml/jsruntime/qv4arrayobject.cpp index e2ff0b46e2..2d6955efc9 100644 --- a/src/qml/jsruntime/qv4arrayobject.cpp +++ b/src/qml/jsruntime/qv4arrayobject.cpp @@ -438,7 +438,7 @@ ReturnedValue ArrayPrototype::method_slice(CallContext *ctx) ReturnedValue ArrayPrototype::method_sort(CallContext *ctx) { Scope scope(ctx); - Scoped<Object> instance(scope, ctx->d()->callData->thisObject.toObject(scope.engine)); + ScopedObject instance(scope, ctx->d()->callData->thisObject.toObject(scope.engine)); if (!instance) return Encode::undefined(); @@ -684,7 +684,7 @@ ReturnedValue ArrayPrototype::method_lastIndexOf(CallContext *ctx) ReturnedValue ArrayPrototype::method_every(CallContext *ctx) { Scope scope(ctx); - Scoped<Object> instance(scope, ctx->d()->callData->thisObject.toObject(scope.engine)); + ScopedObject instance(scope, ctx->d()->callData->thisObject.toObject(scope.engine)); if (!instance) return Encode::undefined(); @@ -718,7 +718,7 @@ ReturnedValue ArrayPrototype::method_every(CallContext *ctx) ReturnedValue ArrayPrototype::method_some(CallContext *ctx) { Scope scope(ctx); - Scoped<Object> instance(scope, ctx->d()->callData->thisObject.toObject(scope.engine)); + ScopedObject instance(scope, ctx->d()->callData->thisObject.toObject(scope.engine)); if (!instance) return Encode::undefined(); @@ -752,7 +752,7 @@ ReturnedValue ArrayPrototype::method_some(CallContext *ctx) ReturnedValue ArrayPrototype::method_forEach(CallContext *ctx) { Scope scope(ctx); - Scoped<Object> instance(scope, ctx->d()->callData->thisObject.toObject(scope.engine)); + ScopedObject instance(scope, ctx->d()->callData->thisObject.toObject(scope.engine)); if (!instance) return Encode::undefined(); @@ -783,7 +783,7 @@ ReturnedValue ArrayPrototype::method_forEach(CallContext *ctx) ReturnedValue ArrayPrototype::method_map(CallContext *ctx) { Scope scope(ctx); - Scoped<Object> instance(scope, ctx->d()->callData->thisObject.toObject(scope.engine)); + ScopedObject instance(scope, ctx->d()->callData->thisObject.toObject(scope.engine)); if (!instance) return Encode::undefined(); @@ -820,7 +820,7 @@ ReturnedValue ArrayPrototype::method_map(CallContext *ctx) ReturnedValue ArrayPrototype::method_filter(CallContext *ctx) { Scope scope(ctx); - Scoped<Object> instance(scope, ctx->d()->callData->thisObject.toObject(scope.engine)); + ScopedObject instance(scope, ctx->d()->callData->thisObject.toObject(scope.engine)); if (!instance) return Encode::undefined(); @@ -861,7 +861,7 @@ ReturnedValue ArrayPrototype::method_filter(CallContext *ctx) ReturnedValue ArrayPrototype::method_reduce(CallContext *ctx) { Scope scope(ctx); - Scoped<Object> instance(scope, ctx->d()->callData->thisObject.toObject(scope.engine)); + ScopedObject instance(scope, ctx->d()->callData->thisObject.toObject(scope.engine)); if (!instance) return Encode::undefined(); @@ -911,7 +911,7 @@ ReturnedValue ArrayPrototype::method_reduce(CallContext *ctx) ReturnedValue ArrayPrototype::method_reduceRight(CallContext *ctx) { Scope scope(ctx); - Scoped<Object> instance(scope, ctx->d()->callData->thisObject.toObject(scope.engine)); + ScopedObject instance(scope, ctx->d()->callData->thisObject.toObject(scope.engine)); if (!instance) return Encode::undefined(); diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp index 239a799a29..092b113cc3 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp @@ -1056,14 +1056,14 @@ ReturnedValue ExecutionEngine::throwError(const QString &message) ReturnedValue ExecutionEngine::throwSyntaxError(const QString &message, const QString &fileName, int line, int column) { Scope scope(this); - Scoped<Object> error(scope, newSyntaxErrorObject(message, fileName, line, column)); + ScopedObject error(scope, newSyntaxErrorObject(message, fileName, line, column)); return throwError(error); } ReturnedValue ExecutionEngine::throwSyntaxError(const QString &message) { Scope scope(this); - Scoped<Object> error(scope, newSyntaxErrorObject(message)); + ScopedObject error(scope, newSyntaxErrorObject(message)); return throwError(error); } @@ -1071,14 +1071,14 @@ ReturnedValue ExecutionEngine::throwSyntaxError(const QString &message) ReturnedValue ExecutionEngine::throwTypeError() { Scope scope(this); - Scoped<Object> error(scope, newTypeErrorObject(QStringLiteral("Type error"))); + ScopedObject error(scope, newTypeErrorObject(QStringLiteral("Type error"))); return throwError(error); } ReturnedValue ExecutionEngine::throwTypeError(const QString &message) { Scope scope(this); - Scoped<Object> error(scope, newTypeErrorObject(message)); + ScopedObject error(scope, newTypeErrorObject(message)); return throwError(error); } @@ -1087,7 +1087,7 @@ ReturnedValue ExecutionEngine::throwReferenceError(const ValueRef value) Scope scope(this); ScopedString s(scope, value->toString(this)); QString msg = s->toQString() + QStringLiteral(" is not defined"); - Scoped<Object> error(scope, newReferenceErrorObject(msg)); + ScopedObject error(scope, newReferenceErrorObject(msg)); return throwError(error); } @@ -1095,7 +1095,7 @@ ReturnedValue ExecutionEngine::throwReferenceError(const QString &message, const { Scope scope(this); QString msg = message; - Scoped<Object> error(scope, newReferenceErrorObject(msg, fileName, line, column)); + ScopedObject error(scope, newReferenceErrorObject(msg, fileName, line, column)); return throwError(error); } diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp index 4879b7db24..081321e956 100644 --- a/src/qml/jsruntime/qv4functionobject.cpp +++ b/src/qml/jsruntime/qv4functionobject.cpp @@ -148,7 +148,7 @@ void FunctionObject::init(String *n, bool createProto) ensureMemberIndex(s.engine, Heap::FunctionObject::Index_Prototype); if (createProto) { - Scoped<Object> proto(s, scope()->engine->newObject(s.engine->protoClass, s.engine->objectPrototype.asObject())); + ScopedObject proto(s, scope()->engine->newObject(s.engine->protoClass, s.engine->objectPrototype.asObject())); proto->ensureMemberIndex(s.engine, Heap::FunctionObject::Index_ProtoConstructor); proto->memberData()->data[Heap::FunctionObject::Index_ProtoConstructor] = this->asReturnedValue(); memberData()->data[Heap::FunctionObject::Index_Prototype] = proto.asReturnedValue(); @@ -502,7 +502,7 @@ ReturnedValue SimpleScriptFunction::construct(Managed *that, CallData *callData) } Q_ASSERT(v4->currentContext() == &ctx); - Scoped<Object> result(scope, Q_V4_PROFILE(v4, f->function())); + ScopedObject result(scope, Q_V4_PROFILE(v4, f->function())); if (f->function()->compiledFunction->hasQmlDependencies()) QmlContextWrapper::registerQmlDependencies(v4, f->function()->compiledFunction); diff --git a/src/qml/jsruntime/qv4jsonobject.cpp b/src/qml/jsruntime/qv4jsonobject.cpp index 53f9d36eac..f320630181 100644 --- a/src/qml/jsruntime/qv4jsonobject.cpp +++ b/src/qml/jsruntime/qv4jsonobject.cpp @@ -914,7 +914,7 @@ ReturnedValue JsonObject::method_stringify(CallContext *ctx) Stringify stringify(ctx); - Scoped<Object> o(scope, ctx->argument(1)); + ScopedObject o(scope, ctx->argument(1)); if (o) { stringify.replacerFunction = o->asFunctionObject(); if (o->isArrayObject()) { @@ -999,7 +999,7 @@ QJsonValue JsonObject::toJsonValue(const ValueRef value, QV4::ReturnedValue JsonObject::fromJsonObject(ExecutionEngine *engine, const QJsonObject &object) { Scope scope(engine); - Scoped<Object> o(scope, engine->newObject()); + ScopedObject o(scope, engine->newObject()); ScopedString s(scope); ScopedValue v(scope); for (QJsonObject::const_iterator it = object.begin(); it != object.end(); ++it) { diff --git a/src/qml/jsruntime/qv4lookup.cpp b/src/qml/jsruntime/qv4lookup.cpp index 8a9a6c39e1..c0297696db 100644 --- a/src/qml/jsruntime/qv4lookup.cpp +++ b/src/qml/jsruntime/qv4lookup.cpp @@ -120,7 +120,7 @@ ReturnedValue Lookup::indexedGetterFallback(Lookup *l, const ValueRef object, co Scope scope(l->engine); uint idx = index->asArrayIndex(); - Scoped<Object> o(scope, object); + ScopedObject o(scope, object); if (!o) { if (idx < UINT_MAX) { if (String *str = object->asString()) { diff --git a/src/qml/jsruntime/qv4object_p.h b/src/qml/jsruntime/qv4object_p.h index 084bd85fc5..c256b1f34b 100644 --- a/src/qml/jsruntime/qv4object_p.h +++ b/src/qml/jsruntime/qv4object_p.h @@ -202,7 +202,7 @@ public: inline bool protoHasArray() { Scope scope(engine()); - Scoped<Object> p(scope, this); + ScopedObject p(scope, this); while ((p = p->prototype())) if (p->arrayData()) diff --git a/src/qml/jsruntime/qv4objectproto.cpp b/src/qml/jsruntime/qv4objectproto.cpp index 096647d425..34a9b9cb64 100644 --- a/src/qml/jsruntime/qv4objectproto.cpp +++ b/src/qml/jsruntime/qv4objectproto.cpp @@ -61,8 +61,8 @@ ReturnedValue ObjectCtor::construct(Managed *that, CallData *callData) Scope scope(v4); ObjectCtor *ctor = static_cast<ObjectCtor *>(that); if (!callData->argc || callData->args[0].isUndefined() || callData->args[0].isNull()) { - Scoped<Object> obj(scope, v4->newObject()); - Scoped<Object> proto(scope, ctor->get(v4->id_prototype)); + ScopedObject obj(scope, v4->newObject()); + ScopedObject proto(scope, ctor->get(v4->id_prototype)); if (!!proto) obj->setPrototype(proto); return obj.asReturnedValue(); @@ -118,18 +118,18 @@ void ObjectPrototype::init(ExecutionEngine *v4, Object *ctor) ReturnedValue ObjectPrototype::method_getPrototypeOf(CallContext *ctx) { Scope scope(ctx); - Scoped<Object> o(scope, ctx->argument(0)); + ScopedObject o(scope, ctx->argument(0)); if (!o) return ctx->engine()->throwTypeError(); - Scoped<Object> p(scope, o->prototype()); + ScopedObject p(scope, o->prototype()); return !!p ? p->asReturnedValue() : Encode::null(); } ReturnedValue ObjectPrototype::method_getOwnPropertyDescriptor(CallContext *ctx) { Scope scope(ctx); - Scoped<Object> O(scope, ctx->argument(0)); + ScopedObject O(scope, ctx->argument(0)); if (!O) return ctx->engine()->throwTypeError(); @@ -163,7 +163,7 @@ ReturnedValue ObjectPrototype::method_create(CallContext *ctx) if (!O->isObject() && !O->isNull()) return ctx->engine()->throwTypeError(); - Scoped<Object> newObject(scope, ctx->d()->engine->newObject()); + ScopedObject newObject(scope, ctx->d()->engine->newObject()); newObject->setPrototype(O->asObject()); if (ctx->d()->callData->argc > 1 && !ctx->d()->callData->args[1].isUndefined()) { @@ -177,7 +177,7 @@ ReturnedValue ObjectPrototype::method_create(CallContext *ctx) ReturnedValue ObjectPrototype::method_defineProperty(CallContext *ctx) { Scope scope(ctx); - Scoped<Object> O(scope, ctx->argument(0)); + ScopedObject O(scope, ctx->argument(0)); if (!O) return ctx->engine()->throwTypeError(); @@ -201,11 +201,11 @@ ReturnedValue ObjectPrototype::method_defineProperty(CallContext *ctx) ReturnedValue ObjectPrototype::method_defineProperties(CallContext *ctx) { Scope scope(ctx); - Scoped<Object> O(scope, ctx->argument(0)); + ScopedObject O(scope, ctx->argument(0)); if (!O) return ctx->engine()->throwTypeError(); - Scoped<Object> o(scope, ctx->argument(1), Scoped<Object>::Convert); + ScopedObject o(scope, ctx->argument(1), ScopedObject::Convert); if (scope.engine->hasException) return Encode::undefined(); ScopedValue val(scope); @@ -240,7 +240,7 @@ ReturnedValue ObjectPrototype::method_defineProperties(CallContext *ctx) ReturnedValue ObjectPrototype::method_seal(CallContext *ctx) { Scope scope(ctx); - Scoped<Object> o(scope, ctx->argument(0)); + ScopedObject o(scope, ctx->argument(0)); if (!o) return ctx->engine()->throwTypeError(); @@ -262,7 +262,7 @@ ReturnedValue ObjectPrototype::method_seal(CallContext *ctx) ReturnedValue ObjectPrototype::method_freeze(CallContext *ctx) { Scope scope(ctx); - Scoped<Object> o(scope, ctx->argument(0)); + ScopedObject o(scope, ctx->argument(0)); if (!o) return ctx->engine()->throwTypeError(); @@ -288,7 +288,7 @@ ReturnedValue ObjectPrototype::method_freeze(CallContext *ctx) ReturnedValue ObjectPrototype::method_preventExtensions(CallContext *ctx) { Scope scope(ctx); - Scoped<Object> o(scope, ctx->argument(0)); + ScopedObject o(scope, ctx->argument(0)); if (!o) return ctx->engine()->throwTypeError(); @@ -299,7 +299,7 @@ ReturnedValue ObjectPrototype::method_preventExtensions(CallContext *ctx) ReturnedValue ObjectPrototype::method_isSealed(CallContext *ctx) { Scope scope(ctx); - Scoped<Object> o(scope, ctx->argument(0)); + ScopedObject o(scope, ctx->argument(0)); if (!o) return ctx->engine()->throwTypeError(); @@ -328,7 +328,7 @@ ReturnedValue ObjectPrototype::method_isSealed(CallContext *ctx) ReturnedValue ObjectPrototype::method_isFrozen(CallContext *ctx) { Scope scope(ctx); - Scoped<Object> o(scope, ctx->argument(0)); + ScopedObject o(scope, ctx->argument(0)); if (!o) return ctx->engine()->throwTypeError(); @@ -357,7 +357,7 @@ ReturnedValue ObjectPrototype::method_isFrozen(CallContext *ctx) ReturnedValue ObjectPrototype::method_isExtensible(CallContext *ctx) { Scope scope(ctx); - Scoped<Object> o(scope, ctx->argument(0)); + ScopedObject o(scope, ctx->argument(0)); if (!o) return ctx->engine()->throwTypeError(); @@ -367,7 +367,7 @@ ReturnedValue ObjectPrototype::method_isExtensible(CallContext *ctx) ReturnedValue ObjectPrototype::method_keys(CallContext *ctx) { Scope scope(ctx); - Scoped<Object> o(scope, ctx->argument(0)); + ScopedObject o(scope, ctx->argument(0)); if (!o) return ctx->engine()->throwTypeError(); @@ -428,7 +428,7 @@ ReturnedValue ObjectPrototype::method_hasOwnProperty(CallContext *ctx) 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); + ScopedObject O(scope, ctx->d()->callData->thisObject, ScopedObject::Convert); if (scope.engine->hasException) return Encode::undefined(); bool r = O->hasOwnProperty(P); @@ -440,14 +440,14 @@ ReturnedValue ObjectPrototype::method_hasOwnProperty(CallContext *ctx) ReturnedValue ObjectPrototype::method_isPrototypeOf(CallContext *ctx) { Scope scope(ctx); - Scoped<Object> V(scope, ctx->argument(0)); + ScopedObject V(scope, ctx->argument(0)); if (!V) return Encode(false); - Scoped<Object> O(scope, ctx->d()->callData->thisObject, Scoped<Object>::Convert); + ScopedObject O(scope, ctx->d()->callData->thisObject, ScopedObject::Convert); if (scope.engine->hasException) return Encode::undefined(); - Scoped<Object> proto(scope, V->prototype()); + ScopedObject proto(scope, V->prototype()); while (proto) { if (O->d() == proto->d()) return Encode(true); @@ -463,7 +463,7 @@ ReturnedValue ObjectPrototype::method_propertyIsEnumerable(CallContext *ctx) if (scope.engine->hasException) return Encode::undefined(); - Scoped<Object> o(scope, ctx->d()->callData->thisObject, Scoped<Object>::Convert); + ScopedObject o(scope, ctx->d()->callData->thisObject, ScopedObject::Convert); if (scope.engine->hasException) return Encode::undefined(); PropertyAttributes attrs; @@ -485,7 +485,7 @@ ReturnedValue ObjectPrototype::method_defineGetter(CallContext *ctx) if (scope.engine->hasException) return Encode::undefined(); - Scoped<Object> o(scope, ctx->d()->callData->thisObject); + ScopedObject o(scope, ctx->d()->callData->thisObject); if (!o) { if (!ctx->d()->callData->thisObject.isUndefined()) return Encode::undefined(); @@ -513,7 +513,7 @@ ReturnedValue ObjectPrototype::method_defineSetter(CallContext *ctx) if (scope.engine->hasException) return Encode::undefined(); - Scoped<Object> o(scope, ctx->d()->callData->thisObject); + ScopedObject o(scope, ctx->d()->callData->thisObject); if (!o) { if (!ctx->d()->callData->thisObject.isUndefined()) return Encode::undefined(); @@ -540,7 +540,7 @@ ReturnedValue ObjectPrototype::method_get_proto(CallContext *ctx) ReturnedValue ObjectPrototype::method_set_proto(CallContext *ctx) { Scope scope(ctx); - Scoped<Object> o(scope, ctx->d()->callData->thisObject); + ScopedObject o(scope, ctx->d()->callData->thisObject); if (!o || !ctx->d()->callData->argc) return ctx->engine()->throwTypeError(); @@ -549,7 +549,7 @@ ReturnedValue ObjectPrototype::method_set_proto(CallContext *ctx) return Encode::undefined(); } - Scoped<Object> p(scope, ctx->d()->callData->args[0]); + ScopedObject p(scope, ctx->d()->callData->args[0]); bool ok = false; if (!!p) { if (o->prototype() == p->d()) { diff --git a/src/qml/jsruntime/qv4qobjectwrapper.cpp b/src/qml/jsruntime/qv4qobjectwrapper.cpp index 021b864c0f..9355f31115 100644 --- a/src/qml/jsruntime/qv4qobjectwrapper.cpp +++ b/src/qml/jsruntime/qv4qobjectwrapper.cpp @@ -340,7 +340,7 @@ ReturnedValue QObjectWrapper::getProperty(QObject *object, ExecutionContext *ctx Q_ASSERT(vmemo); return vmemo->vmeMethod(property->coreIndex); } else if (property->isV4Function()) { - QV4::Scoped<QV4::Object> qmlcontextobject(scope, ctx->d()->engine->qmlContextObject()); + QV4::ScopedObject qmlcontextobject(scope, ctx->d()->engine->qmlContextObject()); ScopedContext global(scope, scope.engine->rootContext()); return QV4::QObjectMethod::create(global, object, property->coreIndex, qmlcontextobject); } else if (property->isSignalHandler()) { @@ -601,7 +601,7 @@ ReturnedValue QObjectWrapper::wrap(ExecutionEngine *engine, QObject *object) } else { // If this object is tainted, we have to check to see if it is in our // tainted object list - Scoped<Object> alternateWrapper(scope, (Object *)0); + ScopedObject alternateWrapper(scope, (Object *)0); if (engine->m_multiplyWrappedQObjects && ddata->hasTaintedV8Object) alternateWrapper = engine->m_multiplyWrappedQObjects->value(object); diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp index c045655da9..a77604fe5c 100644 --- a/src/qml/jsruntime/qv4runtime.cpp +++ b/src/qml/jsruntime/qv4runtime.cpp @@ -573,7 +573,7 @@ ReturnedValue Runtime::getElement(ExecutionEngine *engine, const ValueRef object Scope scope(engine); uint idx = index->asArrayIndex(); - Scoped<Object> o(scope, object); + ScopedObject o(scope, object); if (!o) { if (idx < UINT_MAX) { if (String *str = object->asString()) { @@ -638,7 +638,7 @@ void Runtime::setElement(ExecutionEngine *engine, const ValueRef object, const V ReturnedValue Runtime::foreachIterator(ExecutionEngine *engine, const ValueRef in) { Scope scope(engine); - Scoped<Object> o(scope, (Object *)0); + ScopedObject o(scope, (Object *)0); if (!in->isNullOrUndefined()) o = in->toObject(engine); return engine->newForEachIteratorObject(o)->asReturnedValue(); @@ -668,7 +668,7 @@ ReturnedValue Runtime::getProperty(ExecutionEngine *engine, const ValueRef objec Scope scope(engine); ScopedString name(scope, engine->currentContext()->compilationUnit->runtimeStrings[nameIndex]); - Scoped<Object> o(scope, object); + ScopedObject o(scope, object); if (o) return o->get(name); @@ -952,7 +952,7 @@ ReturnedValue Runtime::callProperty(ExecutionEngine *engine, int nameIndex, Call { Scope scope(engine); ScopedString name(scope, engine->currentContext()->compilationUnit->runtimeStrings[nameIndex]); - Scoped<Object> baseObject(scope, callData->thisObject); + ScopedObject baseObject(scope, callData->thisObject); if (!baseObject) { Q_ASSERT(!callData->thisObject.isEmpty()); if (callData->thisObject.isNullOrUndefined()) { @@ -1018,7 +1018,7 @@ ReturnedValue Runtime::constructGlobalLookup(ExecutionEngine *engine, uint index Q_ASSERT(callData->thisObject.isUndefined()); Lookup *l = engine->currentContext()->lookups + index; - Scoped<Object> f(scope, l->globalGetter(l, engine)); + ScopedObject f(scope, l->globalGetter(l, engine)); if (!f) return engine->throwTypeError(); @@ -1059,7 +1059,7 @@ ReturnedValue Runtime::constructProperty(ExecutionEngine *engine, int nameIndex, if (scope.engine->hasException) return Encode::undefined(); - Scoped<Object> f(scope, thisObject->get(name)); + ScopedObject f(scope, thisObject->get(name)); if (!f) return engine->throwTypeError(); @@ -1200,7 +1200,7 @@ ReturnedValue Runtime::objectLiteral(ExecutionEngine *engine, const QV4::Value * { Scope scope(engine); QV4::InternalClass *klass = engine->currentContext()->compilationUnit->runtimeClasses[classId]; - Scoped<Object> o(scope, engine->newObject(klass, engine->objectPrototype.asObject())); + ScopedObject o(scope, engine->newObject(klass, engine->objectPrototype.asObject())); { bool needSparseArray = arrayGetterSetterCountAndFlags >> 30; diff --git a/src/qml/jsruntime/qv4script.cpp b/src/qml/jsruntime/qv4script.cpp index d4eb388d6e..e696dc838c 100644 --- a/src/qml/jsruntime/qv4script.cpp +++ b/src/qml/jsruntime/qv4script.cpp @@ -279,7 +279,7 @@ void Script::parse() if (!vmFunction) { // ### FIX file/line number - Scoped<Object> error(valueScope, v4->newSyntaxErrorObject(QStringLiteral("Syntax error"))); + ScopedObject error(valueScope, v4->newSyntaxErrorObject(QStringLiteral("Syntax error"))); v4->throwError(error); } } diff --git a/src/qml/jsruntime/qv4sequenceobject.cpp b/src/qml/jsruntime/qv4sequenceobject.cpp index 3c8b83545f..fa6af4501e 100644 --- a/src/qml/jsruntime/qv4sequenceobject.cpp +++ b/src/qml/jsruntime/qv4sequenceobject.cpp @@ -590,7 +590,7 @@ bool SequencePrototype::isSequenceType(int sequenceTypeId) #define NEW_REFERENCE_SEQUENCE(ElementType, ElementTypeName, SequenceType, unused) \ if (sequenceType == qMetaTypeId<SequenceType>()) { \ - QV4::Scoped<QV4::Object> obj(scope, engine->memoryManager->alloc<QQml##ElementTypeName##List>(engine, object, propertyIndex)); \ + QV4::ScopedObject obj(scope, engine->memoryManager->alloc<QQml##ElementTypeName##List>(engine, object, propertyIndex)); \ return obj.asReturnedValue(); \ } else @@ -608,7 +608,7 @@ ReturnedValue SequencePrototype::newSequence(QV4::ExecutionEngine *engine, int s #define NEW_COPY_SEQUENCE(ElementType, ElementTypeName, SequenceType, unused) \ if (sequenceType == qMetaTypeId<SequenceType>()) { \ - QV4::Scoped<QV4::Object> obj(scope, engine->memoryManager->alloc<QQml##ElementTypeName##List>(engine, v.value<SequenceType >())); \ + QV4::ScopedObject obj(scope, engine->memoryManager->alloc<QQml##ElementTypeName##List>(engine, v.value<SequenceType >())); \ return obj.asReturnedValue(); \ } else diff --git a/src/qml/jsruntime/qv4serialize.cpp b/src/qml/jsruntime/qv4serialize.cpp index 3d368375bd..2b5513fa96 100644 --- a/src/qml/jsruntime/qv4serialize.cpp +++ b/src/qml/jsruntime/qv4serialize.cpp @@ -323,7 +323,7 @@ ReturnedValue Serialize::deserialize(const char *&data, ExecutionEngine *engine) case WorkerObject: { quint32 size = headersize(header); - Scoped<Object> o(scope, engine->newObject()); + ScopedObject o(scope, engine->newObject()); ScopedValue name(scope); ScopedString n(scope); ScopedValue value(scope); diff --git a/src/qml/jsruntime/qv4string.cpp b/src/qml/jsruntime/qv4string.cpp index e6a7a2f7a7..52756734c5 100644 --- a/src/qml/jsruntime/qv4string.cpp +++ b/src/qml/jsruntime/qv4string.cpp @@ -178,7 +178,7 @@ void String::put(Managed *m, String *name, const ValueRef value) if (scope.hasException()) return; ScopedString that(scope, static_cast<String *>(m)); - Scoped<Object> o(scope, that->engine()->newStringObject(that)); + ScopedObject o(scope, that->engine()->newStringObject(that)); o->put(name, value); } @@ -189,7 +189,7 @@ void String::putIndexed(Managed *m, uint index, const ValueRef value) return; ScopedString that(scope, static_cast<String *>(m)); - Scoped<Object> o(scope, that->engine()->newStringObject(that)); + ScopedObject o(scope, that->engine()->newStringObject(that)); o->putIndexed(index, value); } diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp index 255528c260..894d02f71c 100644 --- a/src/qml/qml/qqmlcomponent.cpp +++ b/src/qml/qml/qqmlcomponent.cpp @@ -1410,7 +1410,7 @@ QQmlComponentExtension::QQmlComponentExtension(QV8Engine *engine) { QV4::ExecutionEngine *v4 = QV8Engine::getV4(engine); QV4::Scope scope(v4); - QV4::Scoped<QV4::Object> proto(scope, v4->newObject()); + QV4::ScopedObject proto(scope, v4->newObject()); proto->defineAccessorProperty(QStringLiteral("onStatusChanged"), QV4::QmlIncubatorObject::method_get_statusChanged, QV4::QmlIncubatorObject::method_set_statusChanged); proto->defineAccessorProperty(QStringLiteral("status"), QV4::QmlIncubatorObject::method_get_status, 0); diff --git a/src/qml/qml/qqmllocale.cpp b/src/qml/qml/qqmllocale.cpp index ce6b956fe6..295347dcd5 100644 --- a/src/qml/qml/qqmllocale.cpp +++ b/src/qml/qml/qqmllocale.cpp @@ -656,7 +656,7 @@ QV8LocaleDataDeletable::QV8LocaleDataDeletable(QV8Engine *engine) { QV4::ExecutionEngine *eng = QV8Engine::getV4(engine); QV4::Scope scope(eng); - QV4::Scoped<QV4::Object> o(scope, eng->newObject()); + QV4::ScopedObject o(scope, eng->newObject()); o->defineDefaultProperty(QStringLiteral("dateFormat"), QQmlLocaleData::method_dateFormat, 0); o->defineDefaultProperty(QStringLiteral("standaloneDayName"), QQmlLocaleData::method_standaloneDayName, 0); diff --git a/src/qml/qml/qqmlvaluetypewrapper.cpp b/src/qml/qml/qqmlvaluetypewrapper.cpp index 222ab0aa31..332cfefde9 100644 --- a/src/qml/qml/qqmlvaluetypewrapper.cpp +++ b/src/qml/qml/qqmlvaluetypewrapper.cpp @@ -163,7 +163,7 @@ void QQmlValueTypeWrapper::initProto(ExecutionEngine *v4) return; Scope scope(v4); - Scoped<Object> o(scope, v4->newObject()); + ScopedObject o(scope, v4->newObject()); o->defineDefaultProperty(v4->id_toString, method_toString, 1); v4->qmlExtensions()->valueTypeWrapperPrototype = o->d(); } diff --git a/src/qml/qml/qqmlxmlhttprequest.cpp b/src/qml/qml/qqmlxmlhttprequest.cpp index c8b771e9f9..c2f8a84e56 100644 --- a/src/qml/qml/qqmlxmlhttprequest.cpp +++ b/src/qml/qml/qqmlxmlhttprequest.cpp @@ -65,7 +65,7 @@ using namespace QV4; #ifndef QT_NO_XMLSTREAMREADER #define V4THROW_REFERENCE(string) { \ - Scoped<Object> error(scope, ctx->engine()->newReferenceErrorObject(QStringLiteral(string))); \ + ScopedObject error(scope, ctx->engine()->newReferenceErrorObject(QStringLiteral(string))); \ return ctx->engine()->throwError(error); \ } @@ -97,7 +97,7 @@ static ReturnedValue constructMeObject(const ValueRef thisObj, QV8Engine *e) { ExecutionEngine *v4 = QV8Engine::getV4(e); Scope scope(v4); - Scoped<Object> meObj(scope, v4->newObject()); + ScopedObject meObj(scope, v4->newObject()); meObj->put(ScopedString(scope, v4->newString(QStringLiteral("ThisObject"))), thisObj); ScopedValue v(scope, QmlContextWrapper::qmlScope(e, e->callingContext(), 0)); meObj->put(ScopedString(scope, v4->newString(QStringLiteral("ActivationObject"))), v); @@ -665,7 +665,7 @@ ReturnedValue Attr::prototype(ExecutionEngine *engine) QQmlXMLHttpRequestData *d = xhrdata(engine->v8Engine); if (d->attrPrototype.isUndefined()) { Scope scope(engine); - Scoped<Object> p(scope, engine->newObject()); + ScopedObject p(scope, engine->newObject()); ScopedObject pp(scope); p->setPrototype((pp = NodePrototype::getProto(engine))); p->defineAccessorProperty(QStringLiteral("name"), method_name, 0); @@ -726,7 +726,7 @@ ReturnedValue CharacterData::prototype(ExecutionEngine *v4) QQmlXMLHttpRequestData *d = xhrdata(v4->v8Engine); if (d->characterDataPrototype.isUndefined()) { Scope scope(v4); - Scoped<Object> p(scope, v4->newObject()); + ScopedObject p(scope, v4->newObject()); ScopedObject pp(scope); p->setPrototype((pp = NodePrototype::getProto(v4))); p->defineAccessorProperty(QStringLiteral("data"), NodePrototype::method_get_nodeValue, 0); @@ -762,7 +762,7 @@ ReturnedValue Text::prototype(ExecutionEngine *v4) QQmlXMLHttpRequestData *d = xhrdata(v4->v8Engine); if (d->textPrototype.isUndefined()) { Scope scope(v4); - Scoped<Object> p(scope, v4->newObject()); + ScopedObject p(scope, v4->newObject()); ScopedObject pp(scope); p->setPrototype((pp = CharacterData::prototype(v4))); p->defineAccessorProperty(QStringLiteral("isElementContentWhitespace"), method_isElementContentWhitespace, 0); @@ -779,7 +779,7 @@ ReturnedValue CDATA::prototype(ExecutionEngine *v4) QQmlXMLHttpRequestData *d = xhrdata(v4->v8Engine); if (d->cdataPrototype.isUndefined()) { Scope scope(v4); - Scoped<Object> p(scope, v4->newObject()); + ScopedObject p(scope, v4->newObject()); ScopedObject pp(scope); p->setPrototype((pp = Text::prototype(v4))); d->cdataPrototype = p; @@ -793,7 +793,7 @@ ReturnedValue Document::prototype(ExecutionEngine *v4) QQmlXMLHttpRequestData *d = xhrdata(v4->v8Engine); if (d->documentPrototype.isUndefined()) { Scope scope(v4); - Scoped<Object> p(scope, v4->newObject()); + ScopedObject p(scope, v4->newObject()); ScopedObject pp(scope); p->setPrototype((pp = NodePrototype::getProto(v4))); p->defineAccessorProperty(QStringLiteral("xmlVersion"), method_xmlVersion, 0); @@ -1556,14 +1556,14 @@ const QByteArray &QQmlXMLHttpRequest::rawResponseBody() const void QQmlXMLHttpRequest::dispatchCallbackImpl(const ValueRef me) { QV4::Scope scope(v4); - Scoped<Object> o(scope, me); + ScopedObject o(scope, me); if (!o) { v4->throwError(QStringLiteral("QQmlXMLHttpRequest: internal error: empty ThisObject")); return; } ScopedString s(scope, v4->newString(QStringLiteral("ThisObject"))); - Scoped<Object> thisObj(scope, o->get(s)); + ScopedObject thisObj(scope, o->get(s)); if (!thisObj) { v4->throwError(QStringLiteral("QQmlXMLHttpRequest: internal error: empty ThisObject")); return; @@ -1577,7 +1577,7 @@ void QQmlXMLHttpRequest::dispatchCallbackImpl(const ValueRef me) } s = v4->newString(QStringLiteral("ActivationObject")); - Scoped<Object> activationObject(scope, o->get(s)); + ScopedObject activationObject(scope, o->get(s)); if (!activationObject) { v4->throwError(QStringLiteral("QQmlXMLHttpRequest: internal error: empty ActivationObject")); return; @@ -1666,7 +1666,7 @@ struct QQmlXMLHttpRequestCtor : public FunctionObject QV8Engine *engine = that->engine()->v8Engine; QQmlXMLHttpRequest *r = new QQmlXMLHttpRequest(engine, engine->networkAccessManager()); Scoped<QQmlXMLHttpRequestWrapper> w(scope, that->engine()->memoryManager->alloc<QQmlXMLHttpRequestWrapper>(that->engine(), r)); - Scoped<Object> proto(scope, ctor->d()->proto); + ScopedObject proto(scope, ctor->d()->proto); w->setPrototype(proto); return w.asReturnedValue(); } @@ -1719,7 +1719,7 @@ void QQmlXMLHttpRequestCtor::setupProto() { ExecutionEngine *v4 = engine(); Scope scope(v4); - Scoped<Object> p(scope, v4->newObject()); + ScopedObject p(scope, v4->newObject()); d()->proto = p->d(); // Methods diff --git a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp index 8d032d9834..9f659a7976 100644 --- a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp +++ b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp @@ -942,7 +942,7 @@ ReturnedValue QtObject::method_createQmlObject(CallContext *ctx) } v = v4->newString(errorstr); - Scoped<Object> errorObject(scope, v4->newErrorObject(v)); + ScopedObject errorObject(scope, v4->newErrorObject(v)); errorObject->put((s = v4->newString(QStringLiteral("qmlErrors"))), qmlerrors); return errorObject.asReturnedValue(); } diff --git a/src/qml/qml/v8/qv4domerrors.cpp b/src/qml/qml/v8/qv4domerrors.cpp index c0ea03f83f..16359285a4 100644 --- a/src/qml/qml/v8/qv4domerrors.cpp +++ b/src/qml/qml/v8/qv4domerrors.cpp @@ -41,7 +41,7 @@ using namespace QV4; void qt_add_domexceptions(ExecutionEngine *e) { Scope scope(e); - Scoped<Object> domexception(scope, e->newObject()); + ScopedObject domexception(scope, e->newObject()); domexception->defineReadonlyProperty(QStringLiteral("INDEX_SIZE_ERR"), Primitive::fromInt32(DOMEXCEPTION_INDEX_SIZE_ERR)); domexception->defineReadonlyProperty(QStringLiteral("DOMSTRING_SIZE_ERR"), Primitive::fromInt32(DOMEXCEPTION_DOMSTRING_SIZE_ERR)); domexception->defineReadonlyProperty(QStringLiteral("HIERARCHY_REQUEST_ERR"), Primitive::fromInt32(DOMEXCEPTION_HIERARCHY_REQUEST_ERR)); diff --git a/src/qml/qml/v8/qv4domerrors_p.h b/src/qml/qml/v8/qv4domerrors_p.h index b68981a492..dfa1675ee6 100644 --- a/src/qml/qml/v8/qv4domerrors_p.h +++ b/src/qml/qml/v8/qv4domerrors_p.h @@ -70,7 +70,7 @@ QT_BEGIN_NAMESPACE #define V4THROW_DOM(error, string) { \ QV4::ScopedValue v(scope, scope.engine->newString(QStringLiteral(string))); \ - QV4::Scoped<Object> ex(scope, scope.engine->newErrorObject(v)); \ + QV4::ScopedObject ex(scope, scope.engine->newErrorObject(v)); \ ex->put(QV4::ScopedString(scope, scope.engine->newIdentifier(QStringLiteral("code"))), QV4::ScopedValue(scope, QV4::Primitive::fromInt32(error))); \ return ctx->engine()->throwError(ex); \ } diff --git a/src/qml/qml/v8/qv4sqlerrors.cpp b/src/qml/qml/v8/qv4sqlerrors.cpp index 77e2257b3e..795ab5fb47 100644 --- a/src/qml/qml/v8/qv4sqlerrors.cpp +++ b/src/qml/qml/v8/qv4sqlerrors.cpp @@ -42,7 +42,7 @@ using namespace QV4; void qt_add_sqlexceptions(QV4::ExecutionEngine *engine) { Scope scope(engine); - Scoped<Object> sqlexception(scope, engine->newObject()); + ScopedObject sqlexception(scope, engine->newObject()); sqlexception->defineReadonlyProperty(QStringLiteral("UNKNOWN_ERR"), Primitive::fromInt32(SQLEXCEPTION_UNKNOWN_ERR)); sqlexception->defineReadonlyProperty(QStringLiteral("DATABASE_ERR"), Primitive::fromInt32(SQLEXCEPTION_DATABASE_ERR)); sqlexception->defineReadonlyProperty(QStringLiteral("VERSION_ERR"), Primitive::fromInt32(SQLEXCEPTION_VERSION_ERR)); diff --git a/src/qml/qml/v8/qv8engine.cpp b/src/qml/qml/v8/qv8engine.cpp index fa9fb6c41d..7014911d39 100644 --- a/src/qml/qml/v8/qv8engine.cpp +++ b/src/qml/qml/v8/qv8engine.cpp @@ -607,7 +607,7 @@ QV4::ReturnedValue QV8Engine::variantListToJS(const QVariantList &lst) QV4::ReturnedValue QV8Engine::variantMapToJS(const QVariantMap &vmap) { QV4::Scope scope(m_v4Engine); - QV4::Scoped<QV4::Object> o(scope, m_v4Engine->newObject()); + QV4::ScopedObject o(scope, m_v4Engine->newObject()); QVariantMap::const_iterator it; QV4::ScopedString s(scope); QV4::ScopedValue v(scope); diff --git a/src/qml/types/qqmldelegatemodel.cpp b/src/qml/types/qqmldelegatemodel.cpp index ec8ad4ac4d..bd3ddcf0d1 100644 --- a/src/qml/types/qqmldelegatemodel.cpp +++ b/src/qml/types/qqmldelegatemodel.cpp @@ -1710,7 +1710,7 @@ void QQmlDelegateModelItemMetaType::initializePrototype() QV4::ExecutionEngine *v4 = QV8Engine::getV4(v8Engine); QV4::Scope scope(v4); - QV4::Scoped<QV4::Object> proto(scope, v4->newObject()); + QV4::ScopedObject proto(scope, v4->newObject()); proto->defineAccessorProperty(QStringLiteral("model"), QQmlDelegateModelItem::get_model, 0); proto->defineAccessorProperty(QStringLiteral("groups"), QQmlDelegateModelItem::get_groups, QQmlDelegateModelItem::set_groups); QV4::ScopedString s(scope); @@ -3338,7 +3338,7 @@ QQmlDelegateModelEngineData::QQmlDelegateModelEngineData(QV8Engine *e) QV4::ExecutionEngine *v4 = QV8Engine::getV4(e); QV4::Scope scope(v4); - QV4::Scoped<QV4::Object> proto(scope, v4->newObject()); + QV4::ScopedObject proto(scope, v4->newObject()); proto->defineAccessorProperty(QStringLiteral("index"), QQmlDelegateModelGroupChange::method_get_index, 0); proto->defineAccessorProperty(QStringLiteral("count"), QQmlDelegateModelGroupChange::method_get_count, 0); proto->defineAccessorProperty(QStringLiteral("moveId"), QQmlDelegateModelGroupChange::method_get_moveId, 0); diff --git a/src/qml/types/qqmllistmodel.cpp b/src/qml/types/qqmllistmodel.cpp index cf9ee747a9..44a64ce71b 100644 --- a/src/qml/types/qqmllistmodel.cpp +++ b/src/qml/types/qqmllistmodel.cpp @@ -1180,7 +1180,7 @@ int ListElement::setJsProperty(const ListLayout::Role &role, const QV4::ValueRef QV4::ScopedArrayObject a(scope, d); if (role.type == ListLayout::Role::List) { QV4::Scope scope(a->engine()); - QV4::Scoped<QV4::Object> o(scope); + QV4::ScopedObject o(scope); ListModel *subModel = new ListModel(role.subLayout, 0, -1); int arrayLength = a->getLength(); @@ -2084,7 +2084,7 @@ void QQmlListModel::append(QQmlV4Function *args) QV4::ScopedArrayObject objectArray(scope, (*args)[0]); if (objectArray) { - QV4::Scoped<QV4::Object> argObject(scope); + QV4::ScopedObject argObject(scope); int objectArrayLength = objectArray->getLength(); diff --git a/src/qml/types/qquickworkerscript.cpp b/src/qml/types/qquickworkerscript.cpp index 7289a476c6..c1a7adf630 100644 --- a/src/qml/types/qquickworkerscript.cpp +++ b/src/qml/types/qquickworkerscript.cpp @@ -306,7 +306,7 @@ QV4::ReturnedValue QQuickWorkerScriptEnginePrivate::getWorker(WorkerScript *scri Q_ASSERT(!!w); w->setReadOnly(false); - QV4::Scoped<QV4::Object> api(scope, v4->newObject()); + QV4::ScopedObject api(scope, v4->newObject()); api->put(QV4::ScopedString(scope, v4->newString(QStringLiteral("sendMessage"))), QV4::ScopedValue(scope, workerEngine->sendFunction(script->id))); w->QV4::Object::put(QV4::ScopedString(scope, v4->newString(QStringLiteral("WorkerScript"))), api); @@ -382,7 +382,7 @@ void QQuickWorkerScriptEnginePrivate::processLoad(int id, const QUrl &url) return; script->source = url; - QV4::Scoped<QV4::Object> activation(scope, getWorker(script)); + QV4::ScopedObject activation(scope, getWorker(script)); if (!activation) return; diff --git a/src/qml/util/qqmladaptormodel.cpp b/src/qml/util/qqmladaptormodel.cpp index 678ff14b1a..262a6ca01c 100644 --- a/src/qml/util/qqmladaptormodel.cpp +++ b/src/qml/util/qqmladaptormodel.cpp @@ -208,7 +208,7 @@ public: { QV4::ExecutionEngine *v4 = data->v4; QV4::Scope scope(v4); - QV4::Scoped<QV4::Object> proto(scope, v4->newObject()); + QV4::ScopedObject proto(scope, v4->newObject()); proto->defineAccessorProperty(QStringLiteral("index"), get_index, 0); proto->defineAccessorProperty(QStringLiteral("hasModelChildren"), get_hasModelChildren, 0); QV4::ScopedProperty p(scope); @@ -959,7 +959,7 @@ QQmlAdaptorModelEngineData::QQmlAdaptorModelEngineData(QV8Engine *e) : v4(QV8Engine::getV4(e)) { QV4::Scope scope(v4); - QV4::Scoped<QV4::Object> proto(scope, v4->newObject()); + QV4::ScopedObject proto(scope, v4->newObject()); proto->defineAccessorProperty(QStringLiteral("index"), get_index, 0); proto->defineAccessorProperty(QStringLiteral("modelData"), QQmlDMListAccessorData::get_modelData, QQmlDMListAccessorData::set_modelData); diff --git a/src/quick/items/context2d/qquickcontext2d.cpp b/src/quick/items/context2d/qquickcontext2d.cpp index 205cf74a67..bed9fb3b2f 100644 --- a/src/quick/items/context2d/qquickcontext2d.cpp +++ b/src/quick/items/context2d/qquickcontext2d.cpp @@ -2829,7 +2829,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_measureText(QV4::CallConte if (ctx->d()->callData->argc >= 1) { QFontMetrics fm(r->d()->context->state.font); uint width = fm.width(ctx->d()->callData->args[0].toQStringNoThrow()); - QV4::Scoped<QV4::Object> tm(scope, scope.engine->newObject()); + QV4::ScopedObject tm(scope, scope.engine->newObject()); tm->put(QV4::ScopedString(scope, scope.engine->newIdentifier(QStringLiteral("width"))).getPointer(), QV4::ScopedValue(scope, QV4::Primitive::fromDouble(width))); return tm.asReturnedValue(); @@ -4208,7 +4208,7 @@ QQuickContext2DEngineData::QQuickContext2DEngineData(QV8Engine *engine) QV4::ExecutionEngine *v4 = QV8Engine::getV4(engine); QV4::Scope scope(v4); - QV4::Scoped<QV4::Object> proto(scope, QQuickJSContext2DPrototype::create(v4)); + QV4::ScopedObject proto(scope, QQuickJSContext2DPrototype::create(v4)); proto->defineAccessorProperty(QStringLiteral("strokeStyle"), QQuickJSContext2D::method_get_strokeStyle, QQuickJSContext2D::method_set_strokeStyle); proto->defineAccessorProperty(QStringLiteral("font"), QQuickJSContext2D::method_get_font, QQuickJSContext2D::method_set_font); proto->defineAccessorProperty(QStringLiteral("fillRule"), QQuickJSContext2D::method_get_fillRule, QQuickJSContext2D::method_set_fillRule); diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp index dc68808748..38736e44b2 100644 --- a/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp @@ -4154,7 +4154,7 @@ void QQuickItem::mapFromItem(QQmlV4Function *args) const return; } - QV4::Scoped<QV4::Object> rv(scope, v4->newObject()); + QV4::ScopedObject rv(scope, v4->newObject()); args->setReturnValue(rv.asReturnedValue()); QV4::ScopedString s(scope); @@ -4233,7 +4233,7 @@ void QQuickItem::mapToItem(QQmlV4Function *args) const return; } - QV4::Scoped<QV4::Object> rv(scope, v4->newObject()); + QV4::ScopedObject rv(scope, v4->newObject()); args->setReturnValue(rv.asReturnedValue()); QV4::ScopedValue v(scope); |