diff options
| author | Ulf Hermann <ulf.hermann@qt.io> | 2025-06-19 12:57:19 +0200 |
|---|---|---|
| committer | Ulf Hermann <ulf.hermann@qt.io> | 2025-06-24 14:38:07 +0200 |
| commit | c1924afcd8239b294bcb0380f573474b5eb16906 (patch) | |
| tree | fe0e0d3de77fb5b68de376b685c617ecfa586f54 /src/quicktestutils/qml/qmlutils.cpp | |
| parent | 9ba7a4cf7e161992209960c32c9fccb445dceec2 (diff) | |
QtQml: Move ExecutionEngine in to QJSEnginePrivate
The ExecutionEngine can live without a QQmlEngine or a QJSEngine, but
not vice versa. Therefore, the ExecutionEngine has to outlive QQmlEngine
and QJSEngine on shutdown.
Since the ExecutionEngine lives longer now, we also need to postpone the
pruning of the type registry. The engine might still hold on to types
after all.
Task-number: QTBUG-137848
Change-Id: Ib574cac84b5f2d974cbc24ed79550a58b69a7a1c
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Diffstat (limited to 'src/quicktestutils/qml/qmlutils.cpp')
| -rw-r--r-- | src/quicktestutils/qml/qmlutils.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/quicktestutils/qml/qmlutils.cpp b/src/quicktestutils/qml/qmlutils.cpp index 08750790b3..9ff4f25e9c 100644 --- a/src/quicktestutils/qml/qmlutils.cpp +++ b/src/quicktestutils/qml/qmlutils.cpp @@ -127,14 +127,12 @@ void gc(QV4::ExecutionEngine &engine, GCFlags flags) } bool gcDone(QQmlEngine *engine) { - auto priv = QQmlEnginePrivate::get(engine); - return gcDone(priv->v4engine()); + return gcDone(engine->handle()); } void gc(QQmlEngine &engine, GCFlags flags) { - auto priv = QQmlEnginePrivate::get(&engine); - gc(*priv->v4engine(), flags); + gc(*engine.handle(), flags); } |
