QmlJS: Track futures to allow testing

Tests often want to wait for all async tasks to finish before
progressing.

Change-Id: I61738df730ca341b5c9d227569d961cd1991b296
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Philip Van Hoof <philip@codeminded.be>
This commit is contained in:
Christian Kamm
2020-05-10 16:00:31 +02:00
parent 037ff590e6
commit 96c860159b
4 changed files with 48 additions and 14 deletions

View File

@@ -45,7 +45,7 @@ void QmlJSToolsPlugin::test_basic()
const QString qmlFilePath = Core::ICore::resourcePath() + QLatin1String("/qmldesigner/itemLibraryQmlSources/ItemDelegate.qml");
modelManager->updateSourceFiles(QStringList(qmlFilePath), false);
modelManager->joinAllThreads();
modelManager->test_joinAllThreads();
Snapshot snapshot = modelManager->snapshot();
Document::Ptr doc = snapshot.document(qmlFilePath);