aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/qmljs/qmljscheck.cpp
diff options
context:
space:
mode:
authorChristian Kamm <[email protected]>2010-02-17 09:29:13 +0100
committerChristian Kamm <[email protected]>2010-02-17 09:29:13 +0100
commit3035733415225ef3bb93f52f0840f27cb10fbc2e (patch)
treed761f86afaf5b285d4db9bff750f9ea52ee38f2b /src/libs/qmljs/qmljscheck.cpp
parent265118eb5e59d1be3fb507c86a9f3dd8b9b77fe9 (diff)
Workaround for not erroring on anchors { ... } in Qml for now.
Diffstat (limited to 'src/libs/qmljs/qmljscheck.cpp')
-rw-r--r--src/libs/qmljs/qmljscheck.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libs/qmljs/qmljscheck.cpp b/src/libs/qmljs/qmljscheck.cpp
index 1ae028c8152..e128148d15c 100644
--- a/src/libs/qmljs/qmljscheck.cpp
+++ b/src/libs/qmljs/qmljscheck.cpp
@@ -86,8 +86,17 @@ bool Check::visit(UiObjectBinding *ast)
void Check::visitQmlObject(Node *ast, UiQualifiedId *typeId,
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)) {
warning(typeId->identifierToken, QLatin1String("unknown type"));
+ // ### don't give up!
return;
}