QmlJS: Adjust existing code for updated QML parser.

Change-Id: I153723eeb9973be025daf47e317f7b9d076a3c72
Reviewed-on: http://codereview.qt-project.org/4733
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
This commit is contained in:
Christian Kamm
2011-09-13 09:57:24 +02:00
parent b531209002
commit 4b2f42cf87
30 changed files with 234 additions and 249 deletions

View File

@@ -452,11 +452,11 @@ IAssistProposal *QmlJSCompletionAssistProcessor::perform(const IAssistInterface
break;
const ObjectValue *newScopeType = qmlScopeType;
for (AST::UiQualifiedId *it = objDef->qualifiedTypeNameId; it; it = it->next) {
if (!newScopeType || !it->name) {
if (!newScopeType || it->name.isEmpty()) {
newScopeType = 0;
break;
}
const Value *v = newScopeType->lookupMember(it->name->asString(), context);
const Value *v = newScopeType->lookupMember(it->name.toString(), context);
v = context->lookupReference(v);
newScopeType = value_cast<const ObjectValue *>(v);
}