forked from qt-creator/qt-creator
Keep the snapshot around when performing a global completion
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user