forked from qt-creator/qt-creator
qmljs: fix tst_dependencies
Fixed the dependencies test. Now it makes sure that all dependencies are loaded before evaluating the checks, otherwise a race condition in the link process (QTCREATORBUG-25240) might give problems. This requires running the event loop to ensure that the invokeMethod in PluginDumper::loadPluginTypes creates the futures in the model manager. Change-Id: I4c0dd5cc948917e2a74fd46c3b66ee3bb5370da4 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
@@ -151,7 +151,9 @@ void tst_Dependencies::test()
|
|||||||
lPaths.maybeInsert(Utils::FilePath::fromString(p), Dialect::Qml);
|
lPaths.maybeInsert(Utils::FilePath::fromString(p), Dialect::Qml);
|
||||||
ModelManagerInterface::importScan(result, ModelManagerInterface::workingCopy(), lPaths,
|
ModelManagerInterface::importScan(result, ModelManagerInterface::workingCopy(), lPaths,
|
||||||
ModelManagerInterface::instance(), false);
|
ModelManagerInterface::instance(), false);
|
||||||
|
QCoreApplication::processEvents();
|
||||||
|
ModelManagerInterface::instance()->test_joinAllThreads();
|
||||||
|
QCoreApplication::processEvents();
|
||||||
TestData data = testData(filename);
|
TestData data = testData(filename);
|
||||||
Document::MutablePtr doc = data.doc;
|
Document::MutablePtr doc = data.doc;
|
||||||
int nExpectedSemanticMessages = data.semanticMessages;
|
int nExpectedSemanticMessages = data.semanticMessages;
|
||||||
|
Reference in New Issue
Block a user