aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/qmljs/qmljsmodelmanagerinterface.cpp
diff options
context:
space:
mode:
authorThomas Hartmann <[email protected]>2024-12-13 18:01:38 +0100
committerThomas Hartmann <[email protected]>2024-12-16 15:19:05 +0000
commita8c18f6c04d40f3efe73778825fa1f7bbf74bf12 (patch)
tree685071f42d5e9e5fad05debc8d3fe17a2fe5efa4 /src/libs/qmljs/qmljsmodelmanagerinterface.cpp
parent41f04cd99170ae0be4787a0f770939a78c803625 (diff)
QmlDesigner: Wait until ModelManagerInterface is finished when loading
This is usually the case when opening the first file and will take about a second. This makes incomplete types a lot more improbable. Change-Id: Ie3b545283f531f362cacbeb66ec1d2d30e619566 Reviewed-by: Miikka Heikkinen <[email protected]> Reviewed-by: Marco Bubke <[email protected]>
Diffstat (limited to 'src/libs/qmljs/qmljsmodelmanagerinterface.cpp')
-rw-r--r--src/libs/qmljs/qmljsmodelmanagerinterface.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libs/qmljs/qmljsmodelmanagerinterface.cpp b/src/libs/qmljs/qmljsmodelmanagerinterface.cpp
index cff35cc777b..9da07607708 100644
--- a/src/libs/qmljs/qmljsmodelmanagerinterface.cpp
+++ b/src/libs/qmljs/qmljsmodelmanagerinterface.cpp
@@ -327,6 +327,11 @@ void ModelManagerInterface::cancelAllThreads()
m_futureSynchronizer.cancelAllFutures();
}
+void ModelManagerInterface::waitForFinished()
+{
+ m_futureSynchronizer.waitForFinished();
+}
+
Snapshot ModelManagerInterface::snapshot() const
{
return m_syncedData.readLocked()->m_validSnapshot;