Bind each QML document after parsing. Link them before use.

Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This commit is contained in:
Christian Kamm
2010-02-02 15:55:17 +01:00
parent e7a330f92a
commit 03fa188b41
8 changed files with 321 additions and 315 deletions

View File

@@ -632,10 +632,11 @@ int QmlCodeCompletion::startCompletion(TextEditor::ITextEditable *editor)
// Set up the current scope chain.
Interpreter::ObjectValue *scope = interp.globalObject();
Link link(qmlDocument, snapshot, &interp);
if (isQmlFile && qmlDocument) {
AST::UiObjectMember *declaringMember = semanticInfo.declaringMember(editor->position());
scope = Bind::scopeChainAt(qmlDocument, snapshot, &interp, declaringMember);
scope = link.scopeChainAt(qmlDocument, declaringMember);
}
// Search for the operator that triggered the completion.