Commit f74d3fbb authored by Christian Kamm's avatar Christian Kamm
Browse files

QmlJS: Allow for 'ModuleApi' elements in qmltypes files.

But ignore them for now. Reading them is a new feature that will
be introduced in master.

Change-Id: Id362caab2e3b48e198d87f59a0a7d99d24267378

Sanity-Review: Qt Sanity Bot <>
Reviewed-by: default avatarThomas Hartmann <>
parent 1a06d4f5
......@@ -145,12 +145,14 @@ void TypeDescriptionReader::readModule(UiObjectDefinition *ast)
for (UiObjectMemberList *it = ast->initializer->members; it; it = it->next) {
UiObjectMember *member = it->member;
UiObjectDefinition *component = dynamic_cast<UiObjectDefinition *>(member);
if (!component || Bind::toString(component->qualifiedTypeNameId) != "Component") {
addWarning(member->firstSourceLocation(), "Expected only 'Component' object definitions");
const QString typeName = Bind::toString(component->qualifiedTypeNameId);
if (!component || (typeName != "Component" && typeName != "ModuleApi")) {
addWarning(member->firstSourceLocation(), "Expected only 'Component' and 'ModuleApi' object definitions");
if (typeName == QLatin1String("Component"))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment