aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmltyperegistrar/metatypesjsonprocessor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qmltyperegistrar/metatypesjsonprocessor.cpp')
-rw-r--r--src/qmltyperegistrar/metatypesjsonprocessor.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/qmltyperegistrar/metatypesjsonprocessor.cpp b/src/qmltyperegistrar/metatypesjsonprocessor.cpp
index f71a94c67d..e4b9c32b8b 100644
--- a/src/qmltyperegistrar/metatypesjsonprocessor.cpp
+++ b/src/qmltyperegistrar/metatypesjsonprocessor.cpp
@@ -153,6 +153,7 @@ QVector<QJsonObject> MetaTypesJsonProcessor::foreignRelatedTypes() const
const QLatin1String qmlNamePrefix("QML.");
const QLatin1String qmlForeignName("QML.Foreign");
const QLatin1String qmlAttachedName("QML.Attached");
+ const QLatin1String qmlSequenceName("QML.Sequence");
const QLatin1String valueKey("value");
const QLatin1String superClassesKey("superClasses");
const QLatin1String accessKey("access");
@@ -214,9 +215,10 @@ QVector<QJsonObject> MetaTypesJsonProcessor::foreignRelatedTypes() const
const auto classInfos = classDef.value(classInfosKey).toArray();
for (const QJsonValue classInfo : classInfos) {
const QJsonObject obj = classInfo.toObject();
- if (obj.value(nameKey).toString() == qmlAttachedName) {
+ const QString objNameValue = obj.value(nameKey).toString();
+ if (objNameValue == qmlAttachedName || objNameValue == qmlSequenceName) {
addType(obj.value(valueKey).toString());
- } else if (obj.value(nameKey).toString() == qmlForeignName) {
+ } else if (objNameValue == qmlForeignName) {
const QString foreignClassName = obj.value(valueKey).toString();
if (const QJsonObject *other = QmlTypesClassDescription::findType(
m_foreignTypes, foreignClassName)) {
@@ -230,7 +232,8 @@ QVector<QJsonObject> MetaTypesJsonProcessor::foreignRelatedTypes() const
const auto otherClassInfos = other->value(classInfosKey).toArray();
for (const QJsonValue otherClassInfo : otherClassInfos) {
const QJsonObject obj = otherClassInfo.toObject();
- if (obj.value(nameKey).toString() == qmlAttachedName) {
+ const QString objNameValue = obj.value(nameKey).toString();
+ if (objNameValue == qmlAttachedName || objNameValue == qmlSequenceName) {
addType(obj.value(valueKey).toString());
break;
}