diff options
author | Maximilian Goldstein <max.goldstein@qt.io> | 2021-08-30 16:41:57 +0200 |
---|---|---|
committer | Maximilian Goldstein <max.goldstein@qt.io> | 2021-08-31 11:26:11 +0200 |
commit | ae36668632ce796eb043a552780f55f83bfed448 (patch) | |
tree | 5cd849fa7bcb9fac82b057ac1fc95afb287c6bf5 | |
parent | 405bbc1c0e12e888807ff458c6df600968420e83 (diff) |
typeregistrar: Fix deferred names classinfo check
Change-Id: I0132d3922bf8c315119772910882b969e56eaa0e
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
-rw-r--r-- | src/qmlcompiler/qqmljstypedescriptionreader.cpp | 7 | ||||
-rw-r--r-- | src/qmltyperegistrar/qmltypesclassdescription.cpp | 2 | ||||
-rw-r--r-- | tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.h | 4 |
3 files changed, 8 insertions, 5 deletions
diff --git a/src/qmlcompiler/qqmljstypedescriptionreader.cpp b/src/qmlcompiler/qqmljstypedescriptionreader.cpp index 73bf3bb875..dd8b7fdbd8 100644 --- a/src/qmlcompiler/qqmljstypedescriptionreader.cpp +++ b/src/qmlcompiler/qqmljstypedescriptionreader.cpp @@ -254,12 +254,15 @@ void QQmlJSTypeDescriptionReader::readComponent(UiObjectDefinition *ast) } } else if (name == QLatin1String("extension")) { scope->setExtensionTypeName(readStringBinding(script)); + } else if (name == QLatin1String("deferredNames")) { + // TODO: Store this information } else { addWarning(script->firstSourceLocation(), tr("Expected only name, prototype, defaultProperty, attachedType, " "valueType, exports, interfaces, isSingleton, isCreatable, " - "isComposite, hasCustomParser and " - "exportMetaObjectRevisions script bindings, not \"%1\".") + "isComposite, hasCustomParser, " + "exportMetaObjectRevisions and deferredNames script bindings, not " + "\"%1\".") .arg(name)); } } else { diff --git a/src/qmltyperegistrar/qmltypesclassdescription.cpp b/src/qmltyperegistrar/qmltypesclassdescription.cpp index bcd965013f..d4ece0c1af 100644 --- a/src/qmltyperegistrar/qmltypesclassdescription.cpp +++ b/src/qmltyperegistrar/qmltypesclassdescription.cpp @@ -185,7 +185,7 @@ void QmlTypesClassDescription::collect( } else if (name == QLatin1String("QML.HasCustomParser")) { if (value == QLatin1String("true")) hasCustomParser = true; - } else if (name == QLatin1String("QML.DeferredPropertyNames")) { + } else if (name == QLatin1String("DeferredPropertyNames")) { deferredNames = value.split(u','); } } diff --git a/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.h b/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.h index feb8fd2a03..63766bc8bc 100644 --- a/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.h +++ b/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.h @@ -406,14 +406,14 @@ struct DeferredPropertyNamesEmpty : public QObject { Q_OBJECT QML_ELEMENT - Q_CLASSINFO("QML.DeferredPropertyNames", "") + Q_CLASSINFO("DeferredPropertyNames", "") }; struct DeferredPropertyNames : public QObject { Q_OBJECT QML_ELEMENT - Q_CLASSINFO("QML.DeferredPropertyNames", "A,B,C") + Q_CLASSINFO("DeferredPropertyNames", "A,B,C") }; namespace ForeignNamespace |