diff options
Diffstat (limited to 'src/plugins/cpptools/searchsymbols.cpp')
-rw-r--r-- | src/plugins/cpptools/searchsymbols.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/plugins/cpptools/searchsymbols.cpp b/src/plugins/cpptools/searchsymbols.cpp index f66700bf30..99c2616489 100644 --- a/src/plugins/cpptools/searchsymbols.cpp +++ b/src/plugins/cpptools/searchsymbols.cpp @@ -96,10 +96,9 @@ bool SearchSymbols::visit(Function *symbol) QString extraScope; if (const Name *name = symbol->name()) { - if (const QualifiedNameId *nameId = name->asQualifiedNameId()) { - if (nameId->nameCount() > 1) { - extraScope = overview.prettyName(nameId->nameAt(nameId->nameCount() - 2)); - } + if (const QualifiedNameId *q = name->asQualifiedNameId()) { + if (q->base()) + extraScope = overview.prettyName(q->base()); } } QString fullScope = _scope; |