aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-10-05 17:01:17 +0200
committerUlf Hermann <ulf.hermann@qt.io>2020-10-07 13:26:17 +0200
commit889aeb20bd282744c78c74bf22ba1df7c7d57040 (patch)
tree68f3453341946f2da945cf317f611f181f675836
parentfe013bdbaecd9605ebf715215cef3cd82c1a712f (diff)
Support 5.x style composite types in qmltypes files
In Qt6 we don't want those anymore, but it's easy enough to support them for now. Task-number: QTBUG-87164 Change-Id: I2a6cd1dd99f772d132f71575c9c5f4538a3dd0f0 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
-rw-r--r--src/qmlcompiler/qqmljsimporter.cpp2
-rw-r--r--tests/auto/qml/qmllint/data/OldQmltypes/plugins.qmltypes1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/qmlcompiler/qqmljsimporter.cpp b/src/qmlcompiler/qqmljsimporter.cpp
index 94fcdc460c..73d7637d79 100644
--- a/src/qmlcompiler/qqmljsimporter.cpp
+++ b/src/qmlcompiler/qqmljsimporter.cpp
@@ -198,7 +198,7 @@ void QQmlJSImporter::processImport(
for (auto it = import.objects.begin(); it != import.objects.end(); ++it) {
const auto &val = it.value();
- if (!val->isComposite()) // Otherwise we have already done it in localFile2ScopeTree()
+ if (val->baseType().isNull()) // Otherwise we have already done it in localFile2ScopeTree()
val->resolveTypes(types->cppNames);
}
}
diff --git a/tests/auto/qml/qmllint/data/OldQmltypes/plugins.qmltypes b/tests/auto/qml/qmllint/data/OldQmltypes/plugins.qmltypes
index 71a515d8c5..298eeefff0 100644
--- a/tests/auto/qml/qmllint/data/OldQmltypes/plugins.qmltypes
+++ b/tests/auto/qml/qmllint/data/OldQmltypes/plugins.qmltypes
@@ -6,5 +6,6 @@ Module {
prototype: "QQuickItem"
exports: ["OldQmltypes/Frame 1.0"]
exportMetaObjectRevisions: [0]
+ isComposite: true
}
}