aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2021-02-02 08:35:06 +0100
committerUlf Hermann <ulf.hermann@qt.io>2021-02-02 10:58:28 +0100
commitc892b26f06cd01468f16cfd19536ae4ae6501caf (patch)
treedde6e093157f59a6b07bf033b806d4c05795d505 /src
parent19cdf0aa9e5dbfe5c9eab84d292e4dd9bd61cd5a (diff)
qmltyperegistrar: Do not add extensions to local anonymous types
If we generate a local anonymous type, then that's the local part of a QML_FOREIGN local/foreign couple. Any QML.Extended in there belong to the foreign type. Change-Id: Ic1706045eff03dd7b1b553240596ffc21818c8bd Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/qmltyperegistrar/qmltypesclassdescription.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/qmltyperegistrar/qmltypesclassdescription.cpp b/src/qmltyperegistrar/qmltypesclassdescription.cpp
index 2310b8b3b2..82c1c31ec2 100644
--- a/src/qmltyperegistrar/qmltypesclassdescription.cpp
+++ b/src/qmltyperegistrar/qmltypesclassdescription.cpp
@@ -112,15 +112,8 @@ void QmlTypesClassDescription::collectLocalAnonymous(
const auto classInfos = classDef->value(QLatin1String("classInfos")).toArray();
for (const QJsonValue &classInfo : classInfos) {
const QJsonObject obj = classInfo.toObject();
- const QString name = obj[QStringLiteral("name")].toString();
- const QString value = obj[QStringLiteral("value")].toString();
-
- if (name == QStringLiteral("DefaultProperty")) {
- defaultProp = obj[QLatin1String("value")].toString();
- } else if (name == QStringLiteral("QML.Extended")) {
- extensionType = value;
- collectRelated(value, types, foreign, defaultRevision);
- }
+ if (obj[QStringLiteral("name")].toString() == QStringLiteral("DefaultProperty"))
+ defaultProp = obj[obj[QStringLiteral("value")].toString()].toString();
}
collectInterfaces(classDef);