Commit 4bb0e85c authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Cleanup

parent 53d1eba3
......@@ -616,11 +616,9 @@ int QmlCodeCompletion::startCompletion(TextEditor::ITextEditable *editor)
m_completions.clear();
SemanticInfo semanticInfo = edit->semanticInfo();
const SemanticInfo semanticInfo = edit->semanticInfo();
const QmlJS::Snapshot snapshot = semanticInfo.snapshot;
Document::Ptr qmlDocument = semanticInfo.document;
if (qmlDocument.isNull())
return -1;
const Document::Ptr qmlDocument = semanticInfo.document;
const QFileInfo currentFileInfo(fileName);
......@@ -635,7 +633,7 @@ int QmlCodeCompletion::startCompletion(TextEditor::ITextEditable *editor)
// Set up the current scope chain.
Interpreter::ObjectValue *scope = interp.globalObject();
if (isQmlFile) {
if (isQmlFile && qmlDocument) {
AST::UiObjectMember *declaringMember = semanticInfo.declaringMember(editor->position());
scope = Bind::scopeChainAt(qmlDocument, snapshot, &interp, declaringMember);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment