Skip to content
Snippets Groups Projects
Commit 30357334 authored by Christian Kamm's avatar Christian Kamm
Browse files

Workaround for not erroring on anchors { ... } in Qml for now.

parent 265118eb
No related branches found
No related tags found
No related merge requests found
...@@ -86,8 +86,17 @@ bool Check::visit(UiObjectBinding *ast) ...@@ -86,8 +86,17 @@ bool Check::visit(UiObjectBinding *ast)
void Check::visitQmlObject(Node *ast, UiQualifiedId *typeId, void Check::visitQmlObject(Node *ast, UiQualifiedId *typeId,
UiObjectInitializer *initializer) UiObjectInitializer *initializer)
{ {
// If the 'typeId' starts with a lower-case letter, it doesn't define
// a new object instance. For instance: anchors { ... }
if (typeId->name->asString().at(0).isLower() && ! typeId->next) {
checkScopeObjectMember(typeId);
// ### don't give up!
return;
}
if (! _context.lookupType(_doc.data(), typeId)) { if (! _context.lookupType(_doc.data(), typeId)) {
warning(typeId->identifierToken, QLatin1String("unknown type")); warning(typeId->identifierToken, QLatin1String("unknown type"));
// ### don't give up!
return; return;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment