aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/qmljs/qmljscheck.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <[email protected]>2010-04-06 11:44:55 +0200
committerErik Verbruggen <[email protected]>2010-04-06 11:46:36 +0200
commit491bf79d5f49eef35d34749644272d4203a4c060 (patch)
treeb9dfc1bad17d3690a0781349f71c53a59ebc72f1 /src/libs/qmljs/qmljscheck.cpp
parent80cf99891bd5ba80e5f800ce212fa7c73e660576 (diff)
Changed QML reading in QML designer to use the interpreter for property types.
Diffstat (limited to 'src/libs/qmljs/qmljscheck.cpp')
-rw-r--r--src/libs/qmljs/qmljscheck.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libs/qmljs/qmljscheck.cpp b/src/libs/qmljs/qmljscheck.cpp
index f6eb31a3239..4e0fd13abe8 100644
--- a/src/libs/qmljs/qmljscheck.cpp
+++ b/src/libs/qmljs/qmljscheck.cpp
@@ -302,6 +302,9 @@ bool Check::visit(UiArrayBinding *ast)
return true;
}
+/// When something is changed here, also change ReadingContext::lookupProperty in
+/// texttomodelmerger.cpp
+/// ### Maybe put this into the context as a helper method.
const Value *Check::checkScopeObjectMember(const UiQualifiedId *id)
{
QList<const ObjectValue *> scopeObjects = _context.scopeChain().qmlScopeObjects;
@@ -311,6 +314,9 @@ const Value *Check::checkScopeObjectMember(const UiQualifiedId *id)
if (! id)
return 0; // ### error?
+ if (! id->name) // possible after error recovery
+ return 0;
+
QString propertyName = id->name->asString();
if (propertyName == QLatin1String("id") && ! id->next)