aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2025-10-29 14:22:12 +0100
committerUlf Hermann <ulf.hermann@qt.io>2025-11-21 11:49:39 +0100
commitf159ba951802f5a1d1511c73c01bccc1fc90ead1 (patch)
treed1a77b34d34752bd36783ff488735dc9d29cbed7 /src
parenta6f73cd795c1fc497d20aec81cfcad7be8878297 (diff)
Tooling: Add test for integrating event replay with qmlpreview
This makes sure that the relevant debug services can coexist. In order for this to actually be true, we need to initialize the type loader before we initialize the various services. Otherwise the profiler service will initialize the type loader which will query the preview service for some directories, leading to a deadlock. Task-number: QTBUG-141569 Change-Id: Ia0873802b94b885654c693bdb9a96100cad492bf Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/qml/jsapi/qjsengine.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qml/jsapi/qjsengine.cpp b/src/qml/jsapi/qjsengine.cpp
index e76d7b6507..b847160e51 100644
--- a/src/qml/jsapi/qjsengine.cpp
+++ b/src/qml/jsapi/qjsengine.cpp
@@ -1275,6 +1275,10 @@ void QJSEnginePrivate::addToDebugServer(QJSEngine *q)
if (!server || server->hasEngine(q))
return;
+ // Initialize the type loader before attaching debug services. We'll need it anyway and
+ // we don't want the preview service to block on resolving some paths from QLibraryInfo.
+ QQmlTypeLoader::get(q);
+
server->open();
server->addEngine(q);
}