aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmltypeloader.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-08-21 09:10:21 +0200
committerLars Knoll <lars.knoll@theqtcompany.com>2015-09-09 14:28:39 +0000
commitf766ae49abd9e87a7f056165d8699315343ceaee (patch)
tree789b1cffb6be17bd0a0bfb262cafc9a0447d0eac /src/qml/qml/qqmltypeloader.cpp
parent6f9a090aa5c21916d19e20ebea16ff46690b7346 (diff)
Smaller cleanup
Move the takeContextOwnership method over to the QmlContext. Change-Id: I9330b31a0cb079b1c7e68a00236a69e25ed2c5af Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/qqmltypeloader.cpp')
-rw-r--r--src/qml/qml/qqmltypeloader.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp
index 5f30b83bbd..61aeae4b34 100644
--- a/src/qml/qml/qqmltypeloader.cpp
+++ b/src/qml/qml/qqmltypeloader.cpp
@@ -2539,8 +2539,7 @@ QV4::PersistentValue QQmlScriptData::scriptValueForContext(QQmlContextData *pare
}
QV4::Scoped<QV4::QmlContext> qmlContext(scope, v4->rootContext()->newQmlContext(ctxt, 0));
- QV4::Scoped<QV4::QmlContextWrapper> w(scope, qmlContext->d()->qml);
- w->takeContextOwnership();
+ qmlContext->takeContextOwnership();
m_program->qmlContext.set(scope.engine, qmlContext);
m_program->run();
@@ -2550,7 +2549,7 @@ QV4::PersistentValue QQmlScriptData::scriptValueForContext(QQmlContextData *pare
ep->warning(error);
}
- rv.set(scope.engine, w);
+ rv.set(scope.engine, qmlContext->d()->qml);
if (shared) {
m_value = rv;
m_loaded = true;