Keep the snapshot around when performing a global completion

This commit is contained in:
Roberto Raggi
2010-01-12 12:31:01 +01:00
parent 075f0b0639
commit 3ec38cbe5b

View File

@@ -807,6 +807,7 @@ int CppCodeCompletion::startCompletionInternal(TextEditor::BaseTextEditor *edit,
if (! thisDocument)
return -1;
typeOfExpression.setSnapshot(m_manager->snapshot());
Symbol *lastVisibleSymbol = thisDocument->findSymbolAt(line, column);
if (expression.isEmpty()) {
@@ -820,7 +821,6 @@ int CppCodeCompletion::startCompletionInternal(TextEditor::BaseTextEditor *edit,
}
typeOfExpression.setSnapshot(m_manager->snapshot());
QList<LookupItem> results = typeOfExpression(expression, thisDocument, lastVisibleSymbol);
LookupContext context = typeOfExpression.lookupContext();