aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates/qquickstackelement.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2025-06-03 14:35:29 +0200
committerUlf Hermann <ulf.hermann@qt.io>2025-06-17 07:00:33 +0200
commitd2bc4a4330254c0c68a0ade51b59a71c4b67b470 (patch)
tree8345312f50df0be783618fd75a1d7e52c2ca65d7 /src/quicktemplates/qquickstackelement.cpp
parent8e0810c19c791386fd5f2cefc6b992f45be21750 (diff)
QtQml: Hold QQmlTypeLoader in QV4::ExecutionEngine
... rather than QQmlEngine. This paves the way for having the type loader attached to ExecutionEngine rather than QQmlEngine. Also, reference the execution engine in the type loader, in turn. Task-number: QTBUG-19407 Change-Id: I04e571c5c6ac5bce5e82537cb96c6940c7186f3a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/quicktemplates/qquickstackelement.cpp')
-rw-r--r--src/quicktemplates/qquickstackelement.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/quicktemplates/qquickstackelement.cpp b/src/quicktemplates/qquickstackelement.cpp
index 141fa1819d..04f1d92d8d 100644
--- a/src/quicktemplates/qquickstackelement.cpp
+++ b/src/quicktemplates/qquickstackelement.cpp
@@ -207,14 +207,13 @@ void QQuickStackElement::initialize(RequiredProperties *requiredProperties)
if (!properties.isUndefined()) {
QQmlEngine *engine = qmlEngine(view);
Q_ASSERT(engine);
- QV4::ExecutionEngine *v4 = QQmlEnginePrivate::getV4Engine(engine);
- Q_ASSERT(v4);
- QV4::Scope scope(v4);
+ QV4::Scope scope(engine->handle());
+ Q_ASSERT(scope.engine);
QV4::ScopedValue ipv(scope, properties.value());
QV4::Scoped<QV4::QmlContext> qmlContext(scope, qmlCallingContext.value());
- QV4::ScopedValue qmlObject(scope, QV4::QObjectWrapper::wrap(v4, item));
+ QV4::ScopedValue qmlObject(scope, QV4::QObjectWrapper::wrap(scope.engine, item));
QQmlComponentPrivate::setInitialProperties(
- v4, qmlContext, qmlObject, ipv, requiredProperties, item,
+ scope.engine, qmlContext, qmlObject, ipv, requiredProperties, item,
component ? QQmlComponentPrivate::get(component)->creator() : nullptr);
properties.clear();
}