Commit 3d2e4543 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Add only symbols declared in class scopes when performing class-completion.

parent 02c73367
......@@ -1276,6 +1276,9 @@ void CppCodeCompletion::completeNamespace(const QList<Symbol *> &candidates,
}
foreach (Scope *scope, todo) {
if (! scope->isNamespaceScope())
continue;
addCompletionItem(scope->owner());
for (unsigned i = 0; i < scope->symbolCount(); ++i) {
......@@ -1297,6 +1300,9 @@ void CppCodeCompletion::completeClass(const QList<Symbol *> &candidates,
context.expand(klass->members(), context.visibleScopes(), &todo);
foreach (Scope *scope, todo) {
if (! scope->isClassScope())
continue;
addCompletionItem(scope->owner());
for (unsigned i = 0; i < scope->symbolCount(); ++i) {
......
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