forked from qt-creator/qt-creator
Fixed the global completion to include the injected class name and user types.
This commit is contained in:
@@ -941,7 +941,7 @@ void CppCodeCompletion::globalCompletion(Scope *currentScope)
|
|||||||
if (symbols.first()->isNamespace())
|
if (symbols.first()->isNamespace())
|
||||||
completeNamespace(currentBinding);
|
completeNamespace(currentBinding);
|
||||||
else
|
else
|
||||||
completeClass(currentBinding, false);
|
completeClass(currentBinding);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1440,6 +1440,8 @@ void CppCodeCompletion::completeClass(ClassOrNamespace *b, bool staticLookup)
|
|||||||
|
|
||||||
scopesVisited.insert(scope);
|
scopesVisited.insert(scope);
|
||||||
|
|
||||||
|
addCompletionItem(scope->owner()); // add a completion item for the injected class name.
|
||||||
|
|
||||||
for (Scope::iterator it = scope->firstSymbol(); it != scope->lastSymbol(); ++it) {
|
for (Scope::iterator it = scope->firstSymbol(); it != scope->lastSymbol(); ++it) {
|
||||||
Symbol *member = *it;
|
Symbol *member = *it;
|
||||||
if (member->isFriend())
|
if (member->isFriend())
|
||||||
|
|||||||
Reference in New Issue
Block a user