diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-08-04 23:26:51 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-08-08 18:58:33 +0000 |
commit | 68a717a9cd5a5b092268eaddd3552becc55c74ab (patch) | |
tree | 0a58bb1e40d8f302cc0e690b795e34cd640e036c /src/qml/qml/qqmljavascriptexpression.cpp | |
parent | 8f6a865929da5dc130594dbcd5ace97468f51e59 (diff) |
Remove Scope dependency from registerQmlDependencies
An engine pointer is sufficient.
Change-Id: I6430cfeac3bd2881e89bbbd22ff31ffbd2a2339a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmljavascriptexpression.cpp')
-rw-r--r-- | src/qml/qml/qqmljavascriptexpression.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/qml/qml/qqmljavascriptexpression.cpp b/src/qml/qml/qqmljavascriptexpression.cpp index 981f55a399..aa5fe5a225 100644 --- a/src/qml/qml/qqmljavascriptexpression.cpp +++ b/src/qml/qml/qqmljavascriptexpression.cpp @@ -338,12 +338,11 @@ void QQmlPropertyCapture::captureProperty(QObject *o, int c, int n, Duration dur } } -void QQmlPropertyCapture::registerQmlDependencies(const QV4::CompiledData::Function *compiledFunction, const QV4::Scope &scope) +void QQmlPropertyCapture::registerQmlDependencies(const QV4::ExecutionEngine *engine, const QV4::CompiledData::Function *compiledFunction) { // Let the caller check and avoid the function call :) Q_ASSERT(compiledFunction->hasQmlDependencies()); - QV4::ExecutionEngine *engine = scope.engine; QQmlEnginePrivate *ep = QQmlEnginePrivate::get(engine->qmlEngine()); if (!ep) return; @@ -356,8 +355,8 @@ void QQmlPropertyCapture::registerQmlDependencies(const QV4::CompiledData::Funct capture->expression->m_permanentDependenciesRegistered = true; - QV4::Scoped<QV4::QmlContext> context(scope, engine->qmlContext()); - QQmlContextData *qmlContext = context->qmlContext(); + QV4::Heap::QmlContext *context = engine->qmlContext(); + QQmlContextData *qmlContext = context->qml()->context->contextData(); const QV4::CompiledData::LEUInt32 *idObjectDependency = compiledFunction->qmlIdObjectDependencyTable(); const int idObjectDependencyCount = compiledFunction->nDependingIdObjects; @@ -377,7 +376,7 @@ void QQmlPropertyCapture::registerQmlDependencies(const QV4::CompiledData::Funct QQmlPropertyCapture::Permanently); } - QObject *scopeObject = context->qmlScope(); + QObject *scopeObject = context->qml()->scopeObject; const QV4::CompiledData::LEUInt32 *scopePropertyDependency = compiledFunction->qmlScopePropertiesDependencyTable(); const int scopePropertyDependencyCount = compiledFunction->nDependingScopeProperties; for (int i = 0; i < scopePropertyDependencyCount; ++i) { |