diff options
author | Lars Knoll <lars.knoll@theqtcompany.com> | 2015-01-13 09:01:29 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@digia.com> | 2015-01-13 22:42:04 +0100 |
commit | 39f1e0d66dc434e764731fbfed29c8fd98d217aa (patch) | |
tree | d9855dbedd752c23395ccb6d4d3dc8fc3bece254 /src/qml/qml/qqmltypeloader.cpp | |
parent | a38f9ec6c96559efa56e8f7346f74f5990810c3a (diff) |
Make sure we always have an engine when assigning to a Persistent
This prepares things for a rewrite of the internals of Persistent.
Change-Id: Ib93ec5911984d1bfce87ffdc3f86bc75f6ecafe9
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml/qqmltypeloader.cpp')
-rw-r--r-- | src/qml/qml/qqmltypeloader.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp index 4b7fe9eb04..2a000e34e1 100644 --- a/src/qml/qml/qqmltypeloader.cpp +++ b/src/qml/qml/qqmltypeloader.cpp @@ -2504,7 +2504,7 @@ QV4::PersistentValue QQmlScriptData::scriptValueForContext(QQmlContextData *pare QV4::ScopedObject scriptsArray(scope); if (ctxt->importedScripts.isNullOrUndefined()) { scriptsArray = v4->newArrayObject(scripts.count()); - ctxt->importedScripts = scriptsArray; + ctxt->importedScripts.set(v4, scriptsArray); } else { scriptsArray = ctxt->importedScripts; } @@ -2523,7 +2523,7 @@ QV4::PersistentValue QQmlScriptData::scriptValueForContext(QQmlContextData *pare QV4::ScopedValue qmlglobal(scope, QV4::QmlContextWrapper::qmlScope(v4, ctxt, 0)); QV4::QmlContextWrapper::takeContextOwnership(qmlglobal); - m_program->qml = qmlglobal; + m_program->qml.set(scope.engine, qmlglobal); m_program->run(); if (scope.engine->hasException) { QQmlError error = scope.engine->catchExceptionAsQmlError(); @@ -2531,7 +2531,7 @@ QV4::PersistentValue QQmlScriptData::scriptValueForContext(QQmlContextData *pare ep->warning(error); } - rv = qmlglobal; + rv.set(scope.engine, qmlglobal); if (shared) { m_value = rv; m_loaded = true; |