aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
diff options
context:
space:
mode:
authorOleg Shparber <trollixx@gmail.com>2014-12-31 10:42:15 -0800
committerOleg Shparber <trollixx@gmail.com>2015-01-02 21:29:41 +0100
commit2fadffdc4630eca35d775d973a368feae2630bd9 (patch)
treeb4af3d95e75655573cd2466d6807d3ae78feb47a /src/qml
parent29c0102adb8b800f4947e4e7962ca414fe576866 (diff)
Use QV4::ScopedFunctionObject typedef instead of actual type
Change-Id: I6b4effaa5bef992b4ae9402eea7fe655bc7b18f0 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml')
-rw-r--r--src/qml/jsruntime/qv4arraybuffer.cpp2
-rw-r--r--src/qml/jsruntime/qv4arrayobject.cpp14
-rw-r--r--src/qml/jsruntime/qv4functionobject.cpp2
-rw-r--r--src/qml/jsruntime/qv4jsonobject.cpp2
-rw-r--r--src/qml/jsruntime/qv4object.cpp4
-rw-r--r--src/qml/jsruntime/qv4objectproto.cpp6
-rw-r--r--src/qml/jsruntime/qv4runtime.cpp4
-rw-r--r--src/qml/jsruntime/qv4stringobject.cpp4
-rw-r--r--src/qml/jsruntime/qv4typedarray.cpp2
-rw-r--r--src/qml/qml/qqmlboundsignal.cpp2
-rw-r--r--src/qml/qml/qqmlcomponent.cpp4
-rw-r--r--src/qml/qml/qqmlvmemetaobject.cpp2
-rw-r--r--src/qml/qml/qqmlxmlhttprequest.cpp2
-rw-r--r--src/qml/qml/v8/qqmlbuiltinfunctions.cpp2
-rw-r--r--src/qml/qml/v8/qv8engine.cpp2
-rw-r--r--src/qml/types/qquickworkerscript.cpp2
16 files changed, 28 insertions, 28 deletions
diff --git a/src/qml/jsruntime/qv4arraybuffer.cpp b/src/qml/jsruntime/qv4arraybuffer.cpp
index 9fc3114751..f54161ea18 100644
--- a/src/qml/jsruntime/qv4arraybuffer.cpp
+++ b/src/qml/jsruntime/qv4arraybuffer.cpp
@@ -147,7 +147,7 @@ ReturnedValue ArrayBufferPrototype::method_slice(CallContext *ctx)
double first = (start < 0) ? qMax(a->d()->data->size + start, 0.) : qMin(start, (double)a->d()->data->size);
double final = (end < 0) ? qMax(a->d()->data->size + end, 0.) : qMin(end, (double)a->d()->data->size);
- Scoped<FunctionObject> constructor(scope, a->get(scope.engine->id_constructor));
+ ScopedFunctionObject constructor(scope, a->get(scope.engine->id_constructor));
if (!constructor)
return scope.engine->throwTypeError();
diff --git a/src/qml/jsruntime/qv4arrayobject.cpp b/src/qml/jsruntime/qv4arrayobject.cpp
index f6e676de2c..d388875e3b 100644
--- a/src/qml/jsruntime/qv4arrayobject.cpp
+++ b/src/qml/jsruntime/qv4arrayobject.cpp
@@ -690,7 +690,7 @@ ReturnedValue ArrayPrototype::method_every(CallContext *ctx)
uint len = instance->getLength();
- Scoped<FunctionObject> callback(scope, ctx->argument(0));
+ ScopedFunctionObject callback(scope, ctx->argument(0));
if (!callback)
return ctx->engine()->throwTypeError();
@@ -724,7 +724,7 @@ ReturnedValue ArrayPrototype::method_some(CallContext *ctx)
uint len = instance->getLength();
- Scoped<FunctionObject> callback(scope, ctx->argument(0));
+ ScopedFunctionObject callback(scope, ctx->argument(0));
if (!callback)
return ctx->engine()->throwTypeError();
@@ -758,7 +758,7 @@ ReturnedValue ArrayPrototype::method_forEach(CallContext *ctx)
uint len = instance->getLength();
- Scoped<FunctionObject> callback(scope, ctx->argument(0));
+ ScopedFunctionObject callback(scope, ctx->argument(0));
if (!callback)
return ctx->engine()->throwTypeError();
@@ -789,7 +789,7 @@ ReturnedValue ArrayPrototype::method_map(CallContext *ctx)
uint len = instance->getLength();
- Scoped<FunctionObject> callback(scope, ctx->argument(0));
+ ScopedFunctionObject callback(scope, ctx->argument(0));
if (!callback)
return ctx->engine()->throwTypeError();
@@ -826,7 +826,7 @@ ReturnedValue ArrayPrototype::method_filter(CallContext *ctx)
uint len = instance->getLength();
- Scoped<FunctionObject> callback(scope, ctx->argument(0));
+ ScopedFunctionObject callback(scope, ctx->argument(0));
if (!callback)
return ctx->engine()->throwTypeError();
@@ -867,7 +867,7 @@ ReturnedValue ArrayPrototype::method_reduce(CallContext *ctx)
uint len = instance->getLength();
- Scoped<FunctionObject> callback(scope, ctx->argument(0));
+ ScopedFunctionObject callback(scope, ctx->argument(0));
if (!callback)
return ctx->engine()->throwTypeError();
@@ -917,7 +917,7 @@ ReturnedValue ArrayPrototype::method_reduceRight(CallContext *ctx)
uint len = instance->getLength();
- Scoped<FunctionObject> callback(scope, ctx->argument(0));
+ ScopedFunctionObject callback(scope, ctx->argument(0));
if (!callback)
return ctx->engine()->throwTypeError();
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp
index 4b6e4358df..4879b7db24 100644
--- a/src/qml/jsruntime/qv4functionobject.cpp
+++ b/src/qml/jsruntime/qv4functionobject.cpp
@@ -361,7 +361,7 @@ ReturnedValue FunctionPrototype::method_call(CallContext *ctx)
ReturnedValue FunctionPrototype::method_bind(CallContext *ctx)
{
Scope scope(ctx);
- Scoped<FunctionObject> target(scope, ctx->d()->callData->thisObject);
+ ScopedFunctionObject target(scope, ctx->d()->callData->thisObject);
if (!target)
return ctx->engine()->throwTypeError();
diff --git a/src/qml/jsruntime/qv4jsonobject.cpp b/src/qml/jsruntime/qv4jsonobject.cpp
index a34faeed1a..0bd4cec336 100644
--- a/src/qml/jsruntime/qv4jsonobject.cpp
+++ b/src/qml/jsruntime/qv4jsonobject.cpp
@@ -707,7 +707,7 @@ QString Stringify::Str(const QString &key, ValueRef v)
ScopedObject o(scope, value);
if (o) {
ScopedString s(scope, ctx->d()->engine->newString(QStringLiteral("toJSON")));
- Scoped<FunctionObject> toJSON(scope, o->get(s));
+ ScopedFunctionObject toJSON(scope, o->get(s));
if (!!toJSON) {
ScopedCallData callData(scope, 1);
callData->thisObject = value;
diff --git a/src/qml/jsruntime/qv4object.cpp b/src/qml/jsruntime/qv4object.cpp
index 9f53a9b2d5..cc7171de72 100644
--- a/src/qml/jsruntime/qv4object.cpp
+++ b/src/qml/jsruntime/qv4object.cpp
@@ -137,7 +137,7 @@ void Object::defineDefaultProperty(const QString &name, ReturnedValue (*code)(Ca
Scope scope(e);
ScopedString s(scope, e->newIdentifier(name));
ScopedContext global(scope, e->rootContext());
- Scoped<FunctionObject> function(scope, BuiltinFunction::create(global, s, code));
+ ScopedFunctionObject function(scope, BuiltinFunction::create(global, s, code));
function->defineReadonlyProperty(e->id_length, Primitive::fromInt32(argumentCount));
defineDefaultProperty(s, function);
}
@@ -147,7 +147,7 @@ void Object::defineDefaultProperty(String *name, ReturnedValue (*code)(CallConte
ExecutionEngine *e = engine();
Scope scope(e);
ScopedContext global(scope, e->rootContext());
- Scoped<FunctionObject> function(scope, BuiltinFunction::create(global, name, code));
+ ScopedFunctionObject function(scope, BuiltinFunction::create(global, name, code));
function->defineReadonlyProperty(e->id_length, Primitive::fromInt32(argumentCount));
defineDefaultProperty(name, function);
}
diff --git a/src/qml/jsruntime/qv4objectproto.cpp b/src/qml/jsruntime/qv4objectproto.cpp
index 3a6ddee55b..4e90f652e4 100644
--- a/src/qml/jsruntime/qv4objectproto.cpp
+++ b/src/qml/jsruntime/qv4objectproto.cpp
@@ -405,7 +405,7 @@ ReturnedValue ObjectPrototype::method_toLocaleString(CallContext *ctx)
ScopedObject o(scope, ctx->d()->callData->thisObject.toObject(scope.engine));
if (!o)
return Encode::undefined();
- Scoped<FunctionObject> f(scope, o->get(ctx->d()->engine->id_toString));
+ ScopedFunctionObject f(scope, o->get(ctx->d()->engine->id_toString));
if (!f)
return ctx->engine()->throwTypeError();
ScopedCallData callData(scope);
@@ -477,7 +477,7 @@ ReturnedValue ObjectPrototype::method_defineGetter(CallContext *ctx)
return ctx->engine()->throwTypeError();
Scope scope(ctx);
- Scoped<FunctionObject> f(scope, ctx->argument(1));
+ ScopedFunctionObject f(scope, ctx->argument(1));
if (!f)
return ctx->engine()->throwTypeError();
@@ -505,7 +505,7 @@ ReturnedValue ObjectPrototype::method_defineSetter(CallContext *ctx)
return ctx->engine()->throwTypeError();
Scope scope(ctx);
- Scoped<FunctionObject> f(scope, ctx->argument(1));
+ ScopedFunctionObject f(scope, ctx->argument(1));
if (!f)
return ctx->engine()->throwTypeError();
diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp
index 9b8912fecb..079b147840 100644
--- a/src/qml/jsruntime/qv4runtime.cpp
+++ b/src/qml/jsruntime/qv4runtime.cpp
@@ -905,7 +905,7 @@ ReturnedValue Runtime::callGlobalLookup(ExecutionEngine *engine, uint index, Cal
Q_ASSERT(callData->thisObject.isUndefined());
Lookup *l = engine->currentContext()->lookups + index;
- Scoped<FunctionObject> o(scope, l->globalGetter(l, engine));
+ ScopedFunctionObject o(scope, l->globalGetter(l, engine));
if (!o)
return engine->throwTypeError();
@@ -966,7 +966,7 @@ ReturnedValue Runtime::callProperty(ExecutionEngine *engine, int nameIndex, Call
callData->thisObject = baseObject.asReturnedValue();
}
- Scoped<FunctionObject> o(scope, baseObject->get(name));
+ ScopedFunctionObject o(scope, baseObject->get(name));
if (!o) {
QString error = QStringLiteral("Property '%1' of object %2 is not a function").arg(name->toQString(), callData->thisObject.toQStringNoThrow());
return engine->throwTypeError(error);
diff --git a/src/qml/jsruntime/qv4stringobject.cpp b/src/qml/jsruntime/qv4stringobject.cpp
index 4dd4d5a8d4..df6c8c44a5 100644
--- a/src/qml/jsruntime/qv4stringobject.cpp
+++ b/src/qml/jsruntime/qv4stringobject.cpp
@@ -387,7 +387,7 @@ ReturnedValue StringPrototype::method_match(CallContext *context)
// ### use the standard builtin function, not the one that might be redefined in the proto
ScopedString execString(scope, scope.engine->newString(QStringLiteral("exec")));
- Scoped<FunctionObject> exec(scope, scope.engine->regExpPrototype.asObject()->get(execString));
+ ScopedFunctionObject exec(scope, scope.engine->regExpPrototype.asObject()->get(execString));
ScopedCallData callData(scope, 1);
callData->thisObject = rx;
@@ -536,7 +536,7 @@ ReturnedValue StringPrototype::method_replace(CallContext *ctx)
QString result;
ScopedValue replacement(scope);
ScopedValue replaceValue(scope, ctx->argument(1));
- Scoped<FunctionObject> searchCallback(scope, replaceValue);
+ ScopedFunctionObject searchCallback(scope, replaceValue);
if (!!searchCallback) {
result.reserve(string.length() + 10*numStringMatches);
ScopedCallData callData(scope, numCaptures + 2);
diff --git a/src/qml/jsruntime/qv4typedarray.cpp b/src/qml/jsruntime/qv4typedarray.cpp
index 088c5e1bf8..74adc2e38b 100644
--- a/src/qml/jsruntime/qv4typedarray.cpp
+++ b/src/qml/jsruntime/qv4typedarray.cpp
@@ -560,7 +560,7 @@ ReturnedValue TypedArrayPrototype::method_subarray(CallContext *ctx)
int newLen = end - begin;
- Scoped<FunctionObject> constructor(scope, a->get(scope.engine->id_constructor));
+ ScopedFunctionObject constructor(scope, a->get(scope.engine->id_constructor));
if (!constructor)
return scope.engine->throwTypeError();
diff --git a/src/qml/qml/qqmlboundsignal.cpp b/src/qml/qml/qqmlboundsignal.cpp
index 6720491f1f..aa1c1f6a33 100644
--- a/src/qml/qml/qqmlboundsignal.cpp
+++ b/src/qml/qml/qqmlboundsignal.cpp
@@ -181,7 +181,7 @@ QV4::Function *QQmlBoundSignalExpression::function() const
if (expressionFunctionValid()) {
Q_ASSERT (context() && engine());
QV4::Scope scope(QQmlEnginePrivate::get(engine())->v4engine());
- QV4::Scoped<QV4::FunctionObject> v(scope, m_v8function.value());
+ QV4::ScopedFunctionObject v(scope, m_v8function.value());
return v ? v->function() : 0;
}
return 0;
diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp
index 7f794e6863..255528c260 100644
--- a/src/qml/qml/qqmlcomponent.cpp
+++ b/src/qml/qml/qqmlcomponent.cpp
@@ -1396,7 +1396,7 @@ void QQmlComponentPrivate::initializeObjectWithInitialProperties(const QV4::Valu
if (!valuemap->isUndefined()) {
QV4::ScopedObject qmlGlobalObj(scope, qmlGlobal);
- QV4::Scoped<QV4::FunctionObject> f(scope, QV4::Script::evaluate(QV8Engine::getV4(v8engine),
+ QV4::ScopedFunctionObject f(scope, QV4::Script::evaluate(QV8Engine::getV4(v8engine),
QString::fromLatin1(INITIALPROPERTIES_SOURCE), qmlGlobalObj));
QV4::ScopedCallData callData(scope, 2);
callData->thisObject = v4engine->globalObject();
@@ -1498,7 +1498,7 @@ void QV4::QmlIncubatorObject::setInitialState(QObject *o)
QV4::ExecutionEngine *v4 = QV8Engine::getV4(d()->v8);
QV4::Scope scope(v4);
- QV4::Scoped<QV4::FunctionObject> f(scope, QV4::Script::evaluate(v4, QString::fromLatin1(INITIALPROPERTIES_SOURCE), d()->qmlGlobal.asObject()));
+ QV4::ScopedFunctionObject f(scope, QV4::Script::evaluate(v4, QString::fromLatin1(INITIALPROPERTIES_SOURCE), d()->qmlGlobal.asObject()));
QV4::ScopedCallData callData(scope, 2);
callData->thisObject = v4->globalObject();
callData->args[0] = QV4::QObjectWrapper::wrap(v4, o);
diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp
index 7838d6ce5a..1f21b21aad 100644
--- a/src/qml/qml/qqmlvmemetaobject.cpp
+++ b/src/qml/qml/qqmlvmemetaobject.cpp
@@ -926,7 +926,7 @@ int QQmlVMEMetaObject::metaCall(QMetaObject::Call c, int _id, void **a)
QV4::Scope scope(ep->v4engine());
- QV4::Scoped<QV4::FunctionObject> function(scope, method(id));
+ QV4::ScopedFunctionObject function(scope, method(id));
if (!function) {
// The function was not compiled. There are some exceptional cases which the
// expression rewriter does not rewrite properly (e.g., \r-terminated lines
diff --git a/src/qml/qml/qqmlxmlhttprequest.cpp b/src/qml/qml/qqmlxmlhttprequest.cpp
index 0117432e31..c8b771e9f9 100644
--- a/src/qml/qml/qqmlxmlhttprequest.cpp
+++ b/src/qml/qml/qqmlxmlhttprequest.cpp
@@ -1570,7 +1570,7 @@ void QQmlXMLHttpRequest::dispatchCallbackImpl(const ValueRef me)
}
s = v4->newString(QStringLiteral("onreadystatechange"));
- Scoped<FunctionObject> callback(scope, thisObj->get(s));
+ ScopedFunctionObject callback(scope, thisObj->get(s));
if (!callback) {
// not an error, but no onreadystatechange function to call.
return;
diff --git a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp
index f114616405..06c4e6f592 100644
--- a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp
+++ b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp
@@ -1165,7 +1165,7 @@ void QQmlBindingFunction::initBindingLocation()
ReturnedValue QQmlBindingFunction::call(Managed *that, CallData *callData)
{
Scope scope(that->engine());
- Scoped<FunctionObject> function(scope, static_cast<QQmlBindingFunction*>(that)->d()->originalFunction);
+ ScopedFunctionObject function(scope, static_cast<QQmlBindingFunction*>(that)->d()->originalFunction);
return function->call(callData);
}
diff --git a/src/qml/qml/v8/qv8engine.cpp b/src/qml/qml/v8/qv8engine.cpp
index 3c6fa32f39..81e4c71149 100644
--- a/src/qml/qml/v8/qv8engine.cpp
+++ b/src/qml/qml/v8/qv8engine.cpp
@@ -518,7 +518,7 @@ void QV8Engine::initializeGlobal()
" }"\
"})"
- QV4::Scoped<QV4::FunctionObject> result(scope, QV4::Script::evaluate(m_v4Engine, QString::fromUtf8(FREEZE_SOURCE), 0));
+ QV4::ScopedFunctionObject result(scope, QV4::Script::evaluate(m_v4Engine, QString::fromUtf8(FREEZE_SOURCE), 0));
Q_ASSERT(!!result);
m_freezeObject = result;
#undef FREEZE_SOURCE
diff --git a/src/qml/types/qquickworkerscript.cpp b/src/qml/types/qquickworkerscript.cpp
index 931da96c7d..7289a476c6 100644
--- a/src/qml/types/qquickworkerscript.cpp
+++ b/src/qml/types/qquickworkerscript.cpp
@@ -225,7 +225,7 @@ void QQuickWorkerScriptEnginePrivate::WorkerEngine::init()
onmessage = QV4::Script(globalContext, QString::fromUtf8(CALL_ONMESSAGE_SCRIPT)).run(); // do not use QStringLiteral here, MSVC2012 cannot apply this cleanly to the macro
Q_ASSERT(!scope.engine->hasException);
QV4::Script createsendscript(globalContext, QString::fromUtf8(SEND_MESSAGE_CREATE_SCRIPT)); // do not use QStringLiteral here, MSVC2012 cannot apply this cleanly to the macro
- QV4::Scoped<QV4::FunctionObject> createsendconstructor(scope, createsendscript.run());
+ QV4::ScopedFunctionObject createsendconstructor(scope, createsendscript.run());
Q_ASSERT(!scope.engine->hasException);
QV4::ScopedString name(scope, m_v4Engine->newString(QStringLiteral("sendMessage")));
QV4::ScopedValue function(scope, QV4::BuiltinFunction::create(globalContext, name,