diff options
author | Andrei Golubev <andrei.golubev@qt.io> | 2021-12-16 12:41:11 +0100 |
---|---|---|
committer | Andrei Golubev <andrei.golubev@qt.io> | 2021-12-22 15:43:23 +0100 |
commit | 0d40cde68ea89db46eac896a28ff65bd2c3ab40d (patch) | |
tree | b7645de12a870adaec432e7a2973b1f707ba6ae6 /tests/auto/qml/qmltc/CMakeLists.txt | |
parent | 2947d1a9ee588fda50580623ae9777775dcd20c1 (diff) |
qmltc: Fix explicit import of local QML types
qmltc passes re-import local QML types in order to get their URLs and
modifiable versions of types. The existing logic seems to work only
when we've already imported the types before. But re-import may, in fact,
easily load *same* types from a *different* place. This is totally wrong
and exceptionally evil (even within the passes). Re-write this logic by
looking up the already-imported types from QQmlJSImportVisitor instead
This, in particular, fixes a case:
import MyOwnModule 1.0
MyOwnType { } // oops, does not include "myowntype.h"
Pick-to: 6.3
Change-Id: I35be7e41094c3bb9e210727a7a59bee33b548698
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
Diffstat (limited to 'tests/auto/qml/qmltc/CMakeLists.txt')
-rw-r--r-- | tests/auto/qml/qmltc/CMakeLists.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/qml/qmltc/CMakeLists.txt b/tests/auto/qml/qmltc/CMakeLists.txt index 90731f2e02..fc1d88e56a 100644 --- a/tests/auto/qml/qmltc/CMakeLists.txt +++ b/tests/auto/qml/qmltc/CMakeLists.txt @@ -41,6 +41,7 @@ set(qml_sources data/groupedProperty.qml data/groupedProperty_qquicktext.qml data/localImport.qml + data/localImport_explicit.qml data/newPropertyBoundToOld.qml data/oldPropertyBoundToNew.qml data/nonLocalQmlPropertyBoundToAny.qml |