From f766ae49abd9e87a7f056165d8699315343ceaee Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 21 Aug 2015 09:10:21 +0200 Subject: Smaller cleanup Move the takeContextOwnership method over to the QmlContext. Change-Id: I9330b31a0cb079b1c7e68a00236a69e25ed2c5af Reviewed-by: Simon Hausmann --- src/qml/qml/qqmltypeloader.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/qml/qml/qqmltypeloader.cpp') 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 qmlContext(scope, v4->rootContext()->newQmlContext(ctxt, 0)); - QV4::Scoped 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; -- cgit v1.2.3