aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmltypewrapper.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-06-21 23:26:11 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2013-06-22 21:32:34 +0200
commit40b4ff80ccd2b9dfdaf9af89a962407813e9d810 (patch)
treee1cf7984f9750e953b92c6462edcec00c7bae774 /src/qml/qml/qqmltypewrapper.cpp
parent880fdff795f403759ccdf347226828f7a5bd54ed (diff)
Remove context parameter from Managed::get()
Change-Id: I61837e4b17d7475dcda2f31b8a293c0020930d52 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml/qqmltypewrapper.cpp')
-rw-r--r--src/qml/qml/qqmltypewrapper.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/qml/qml/qqmltypewrapper.cpp b/src/qml/qml/qqmltypewrapper.cpp
index a41e3c439a..aa03b0e1d9 100644
--- a/src/qml/qml/qqmltypewrapper.cpp
+++ b/src/qml/qml/qqmltypewrapper.cpp
@@ -114,11 +114,12 @@ Value QmlTypeWrapper::create(QV8Engine *v8, QObject *o, QQmlTypeNameCache *t, co
}
-Value QmlTypeWrapper::get(Managed *m, ExecutionContext *ctx, String *name, bool *hasProperty)
+Value QmlTypeWrapper::get(Managed *m, String *name, bool *hasProperty)
{
QmlTypeWrapper *w = m->as<QmlTypeWrapper>();
+ QV4::ExecutionEngine *v4 = m->engine();
if (!w)
- ctx->throwTypeError();
+ v4->current->throwTypeError();
if (hasProperty)
*hasProperty = true;
@@ -158,13 +159,13 @@ Value QmlTypeWrapper::get(Managed *m, ExecutionContext *ctx, String *name, bool
}
// check for property.
- return QV4::QObjectWrapper::getQmlProperty(ctx, context, qobjectSingleton, name, QV4::QObjectWrapper::IgnoreRevision);
+ return QV4::QObjectWrapper::getQmlProperty(v4->current, context, qobjectSingleton, name, QV4::QObjectWrapper::IgnoreRevision);
} else if (!siinfo->scriptApi(e).isUndefined()) {
QV4::ExecutionEngine *engine = QV8Engine::getV4(v8engine);
// NOTE: if used in a binding, changes will not trigger re-evaluation since non-NOTIFYable.
QV4::Object *o = QJSValuePrivate::get(siinfo->scriptApi(e))->getValue(engine).asObject();
if (o)
- return o->get(engine->current, name);
+ return o->get(name);
}
// Fall through to base implementation
@@ -182,7 +183,7 @@ Value QmlTypeWrapper::get(Managed *m, ExecutionContext *ctx, String *name, bool
} else if (w->object) {
QObject *ao = qmlAttachedPropertiesObjectById(type->attachedPropertiesId(), object);
if (ao)
- return QV4::QObjectWrapper::getQmlProperty(ctx, context, ao, name, QV4::QObjectWrapper::IgnoreRevision);
+ return QV4::QObjectWrapper::getQmlProperty(v4->current, context, ao, name, QV4::QObjectWrapper::IgnoreRevision);
// Fall through to base implementation
}
@@ -221,7 +222,7 @@ Value QmlTypeWrapper::get(Managed *m, ExecutionContext *ctx, String *name, bool
if (hasProperty)
*hasProperty = false;
- return Object::get(m, ctx, name, hasProperty);
+ return Object::get(m, name, hasProperty);
}