aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlcontextwrapper.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2014-12-30 15:21:16 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2015-01-02 21:11:01 +0100
commit3d11162fba96fb59593108c336a152920ddcf912 (patch)
tree621bff0d1e9b70f507be413ecf2182140e345194 /src/qml/qml/qqmlcontextwrapper.cpp
parent545338b21cd4d96c1b7ea9cc5c647f9a9155a53b (diff)
Reduce v8engine dependency in the type wrapper
Change-Id: I3a50aa3c0929c14ad856463635bf2fb2188f5c9f Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlcontextwrapper.cpp')
-rw-r--r--src/qml/qml/qqmlcontextwrapper.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/qml/qml/qqmlcontextwrapper.cpp b/src/qml/qml/qqmlcontextwrapper.cpp
index bcab5c84d6..0b63849e54 100644
--- a/src/qml/qml/qqmlcontextwrapper.cpp
+++ b/src/qml/qml/qqmlcontextwrapper.cpp
@@ -175,8 +175,6 @@ ReturnedValue QmlContextWrapper::get(Managed *m, String *name, bool *hasProperty
// context = context->parent
// }
- QV8Engine *engine = v4->v8Engine;
-
QObject *scopeObject = resource->getScopeObject();
if (context->imports && name->startsWithUpper()) {
@@ -190,9 +188,9 @@ ReturnedValue QmlContextWrapper::get(Managed *m, String *name, bool *hasProperty
QV4::ScopedObject scripts(scope, context->importedScripts);
return scripts->getIndexed(r.scriptIndex);
} else if (r.type) {
- return QmlTypeWrapper::create(engine, scopeObject, r.type);
+ return QmlTypeWrapper::create(v4, scopeObject, r.type);
} else if (r.importNamespace) {
- return QmlTypeWrapper::create(engine, scopeObject, context->imports, r.importNamespace);
+ return QmlTypeWrapper::create(v4, scopeObject, context->imports, r.importNamespace);
}
Q_ASSERT(!"Unreachable");
}
@@ -200,7 +198,7 @@ ReturnedValue QmlContextWrapper::get(Managed *m, String *name, bool *hasProperty
// Fall through
}
- QQmlEnginePrivate *ep = QQmlEnginePrivate::get(engine->engine());
+ QQmlEnginePrivate *ep = QQmlEnginePrivate::get(v4->v8Engine->engine());
while (context) {
// Search context properties