aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlcontextwrapper.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/qqmlcontextwrapper.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/qqmlcontextwrapper.cpp')
-rw-r--r--src/qml/qml/qqmlcontextwrapper.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/qml/qml/qqmlcontextwrapper.cpp b/src/qml/qml/qqmlcontextwrapper.cpp
index 6bdcda9ca6..2413ebe00f 100644
--- a/src/qml/qml/qqmlcontextwrapper.cpp
+++ b/src/qml/qml/qqmlcontextwrapper.cpp
@@ -126,17 +126,18 @@ void QmlContextWrapper::takeContextOwnership(const Value &qmlglobal)
}
-Value QmlContextWrapper::get(Managed *m, ExecutionContext *ctx, String *name, bool *hasProperty)
+Value QmlContextWrapper::get(Managed *m, String *name, bool *hasProperty)
{
QmlContextWrapper *resource = m->as<QmlContextWrapper>();
+ QV4::ExecutionEngine *v4 = m->engine();
if (!resource)
- ctx->throwTypeError();
+ v4->current->throwTypeError();
if (resource->isNullWrapper)
- return Object::get(m, ctx, name, hasProperty);
+ return Object::get(m, name, hasProperty);
bool hasProp;
- Value result = Object::get(m, ctx, name, &hasProp);
+ Value result = Object::get(m, name, &hasProp);
if (hasProp) {
if (hasProperty)
*hasProperty = hasProp;
@@ -206,7 +207,7 @@ Value QmlContextWrapper::get(Managed *m, ExecutionContext *ctx, String *name, bo
ep->captureProperty(&context->idValues[propertyIdx].bindings);
if (hasProperty)
*hasProperty = true;
- return QV4::QObjectWrapper::wrap(ctx->engine, context->idValues[propertyIdx]);
+ return QV4::QObjectWrapper::wrap(v4, context->idValues[propertyIdx]);
} else {
QQmlContextPrivate *cp = context->asQQmlContextPrivate();
@@ -232,7 +233,7 @@ Value QmlContextWrapper::get(Managed *m, ExecutionContext *ctx, String *name, bo
// Search scope object
if (scopeObject) {
bool hasProp = false;
- QV4::Value result = QV4::QObjectWrapper::getQmlProperty(ctx, context, scopeObject, name, QV4::QObjectWrapper::CheckRevision, &hasProp);
+ QV4::Value result = QV4::QObjectWrapper::getQmlProperty(v4->current, context, scopeObject, name, QV4::QObjectWrapper::CheckRevision, &hasProp);
if (hasProp) {
if (hasProperty)
*hasProperty = true;
@@ -245,7 +246,7 @@ Value QmlContextWrapper::get(Managed *m, ExecutionContext *ctx, String *name, bo
// Search context object
if (context->contextObject) {
bool hasProp = false;
- QV4::Value result = QV4::QObjectWrapper::getQmlProperty(ctx, context, context->contextObject, name, QV4::QObjectWrapper::CheckRevision, &hasProp);
+ QV4::Value result = QV4::QObjectWrapper::getQmlProperty(v4->current, context, context->contextObject, name, QV4::QObjectWrapper::CheckRevision, &hasProp);
if (hasProp) {
if (hasProperty)
*hasProperty = true;