diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2021-06-28 11:04:40 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-06-29 12:56:26 +0000 |
commit | ff2ed938f36602ddd4964ba0d5e0419899607138 (patch) | |
tree | 97b775a8402a5aacf46db529bf9fe5603519dafe /tests | |
parent | 8cdcdf26d43f68c9a9734ac97b799300c8a047ab (diff) |
QtQml: Move locateLocalQmldir and make it a template
It conceptually belongs into QQmlImportDatabase because it messes with
the qmldir cache.
This way, if we reject a qmldir file for whatever reason, we can still
check for further matching qmldir files in other places. We might, for
example determine that we need to load a plugin, but we have been given
a qmldir file in the resource file system. In that case, we want to
check for other instances of the same module in the host file system.
Change-Id: I8fe4a0f188f3732b9d10d017a94562e8bd1fb242
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit dbca762f45d3249974652cccb5d6421440f852ae)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qml/qqmllanguage/data/importJs.7.errors.txt | 1 | ||||
-rw-r--r-- | tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/tests/auto/qml/qqmllanguage/data/importJs.7.errors.txt b/tests/auto/qml/qqmllanguage/data/importJs.7.errors.txt index 8a5f3c6721..f555ed43ae 100644 --- a/tests/auto/qml/qqmllanguage/data/importJs.7.errors.txt +++ b/tests/auto/qml/qqmllanguage/data/importJs.7.errors.txt @@ -1 +1,2 @@ 2:1:"org.qtproject.PureJsModule" is ambiguous. +2:1:"org.qtproject.PureJsModule" is ambiguous. diff --git a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp index 478f236ee2..d09f903ccb 100644 --- a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp +++ b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp @@ -3422,11 +3422,11 @@ void tst_qqmllanguage::importJs() { DETERMINE_ERRORS(errorFile,expected,actual); - QCOMPARE(expected.size(), actual.size()); + QCOMPARE(actual.size(), expected.size()); for (int i = 0; i < expected.size(); ++i) { const int compareLen = qMin(expected.at(i).length(), actual.at(i).length()); - QCOMPARE(expected.at(i).left(compareLen), actual.at(i).left(compareLen)); + QCOMPARE(actual.at(i).left(compareLen), expected.at(i).left(compareLen)); } } |