From 45bdb39c6b4fc7aa0f47f243ca54d4c142e0c1ec Mon Sep 17 00:00:00 2001 From: Fawzi Mohamed Date: Fri, 8 Jan 2021 07:28:53 +0100 Subject: [PATCH] qmljs: fix tst_importcheck Mainly update import lists for Qt5.15 and ensure load is complete before comparing. Change-Id: I954cc4806d49d1a466f5e558b836ce49eb3693b0 Reviewed-by: Ulf Hermann --- .../auto/qml/codemodel/importscheck/tst_importscheck.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/auto/qml/codemodel/importscheck/tst_importscheck.cpp b/tests/auto/qml/codemodel/importscheck/tst_importscheck.cpp index 2496f7341d1..6d7579daa86 100644 --- a/tests/auto/qml/codemodel/importscheck/tst_importscheck.cpp +++ b/tests/auto/qml/codemodel/importscheck/tst_importscheck.cpp @@ -73,6 +73,7 @@ void scanDir(const QString &dir) paths.maybeInsert(Utils::FilePath::fromString(dir), Dialect::Qml); ModelManagerInterface::importScan(result, ModelManagerInterface::workingCopy(), paths, ModelManagerInterface::instance(), false); + ModelManagerInterface::instance()->test_joinAllThreads(); ViewerContext vCtx; vCtx.paths.append(dir); Snapshot snap = ModelManagerInterface::instance()->snapshot(); @@ -123,7 +124,8 @@ void tst_ImportCheck::test_data() QTest::addColumn("expectedFiles"); QTest::newRow("base") << QStringList(QString(TESTSRCDIR "/base")) << QStringList({"QML 1.0", "QtQml 2.2", "QtQml 2.1", "QtQuick 2.0", - "QtQml 2.0", "QtQuick 2.1", "QtQuick 2.2", ""}) + "QtQml 2.0", "QtQuick 2.1", "QtQuick 2.2", "QtQuick 2.14", + ""}) << QStringList(); QTest::newRow("001_flatQmlOnly") << QStringList(QString(TESTSRCDIR "/001_flatQmlOnly")) << QStringList() @@ -169,7 +171,8 @@ void tst_ImportCheck::test_data() << QString(TESTSRCDIR "/003_packageQmlOnly/QtGraphicalEffects/FastBlur.qml")); QTest::newRow("004_cppOnly copy") << QStringList(QString(TESTSRCDIR "/004_cppOnly copy")) << QStringList({ "QML 1.0", "QtQml 2.2", "QtQml 2.1", "QtQuick 2.0", - "QtQml 2.0", "QtQuick 2.1", "QtQuick 2.2", "" }) + "QtQml 2.0", "QtQuick 2.1", "QtQuick 2.2", "QtQuick 2.14", + "" }) << QStringList(); } @@ -185,6 +188,7 @@ void tst_ImportCheck::test() lPaths.maybeInsert(Utils::FilePath::fromString(path), Dialect::Qml); ModelManagerInterface::importScan(result, ModelManagerInterface::workingCopy(), lPaths, ModelManagerInterface::instance(), false); + ModelManagerInterface::instance()->test_joinAllThreads(); ViewerContext vCtx; vCtx.paths.append(paths); Snapshot snap = ModelManagerInterface::instance()->snapshot();