forked from qt-creator/qt-creator
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 Reviewed-on: http://codereview.qt-project.org/6431 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
This commit is contained in:
@@ -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");
|
||||
continue;
|
||||
}
|
||||
|
||||
readComponent(component);
|
||||
if (typeName == QLatin1String("Component"))
|
||||
readComponent(component);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user