aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/qml/jsruntime/qv4context.cpp4
-rw-r--r--src/qml/qml/qqmljavascriptexpression.cpp9
-rw-r--r--src/qml/qml/qqmljavascriptexpression_p.h2
3 files changed, 7 insertions, 8 deletions
diff --git a/src/qml/jsruntime/qv4context.cpp b/src/qml/jsruntime/qv4context.cpp
index db85bc6cef..da76da839b 100644
--- a/src/qml/jsruntime/qv4context.cpp
+++ b/src/qml/jsruntime/qv4context.cpp
@@ -244,7 +244,7 @@ ReturnedValue ExecutionContext::call(Scope &scope, CallData *callData, Function
ReturnedValue res = Q_V4_PROFILE(scope.engine, function);
if (function->hasQmlDependencies)
- QQmlPropertyCapture::registerQmlDependencies(function->compiledFunction, scope);
+ QQmlPropertyCapture::registerQmlDependencies(scope.engine, function->compiledFunction);
return res;
}
@@ -271,7 +271,7 @@ ReturnedValue QV4::ExecutionContext::simpleCall(Scope &scope, CallData *callData
ReturnedValue res = Q_V4_PROFILE(scope.engine, function);
if (function->hasQmlDependencies)
- QQmlPropertyCapture::registerQmlDependencies(function->compiledFunction, scope);
+ QQmlPropertyCapture::registerQmlDependencies(scope.engine, function->compiledFunction);
scope.engine->memoryManager->freeSimpleCallContext();
return res;
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) {
diff --git a/src/qml/qml/qqmljavascriptexpression_p.h b/src/qml/qml/qqmljavascriptexpression_p.h
index 6941aebe64..84be5b673f 100644
--- a/src/qml/qml/qqmljavascriptexpression_p.h
+++ b/src/qml/qml/qqmljavascriptexpression_p.h
@@ -203,7 +203,7 @@ public:
Permanently
};
- static void registerQmlDependencies(const QV4::CompiledData::Function *compiledFunction, const QV4::Scope &scope);
+ static void registerQmlDependencies(const QV4::ExecutionEngine *engine, const QV4::CompiledData::Function *compiledFunction);
void captureProperty(QQmlNotifier *, Duration duration = OnlyOnce);
void captureProperty(QObject *, int, int, Duration duration = OnlyOnce);