forked from qt-creator/qt-creator
CppTools: Fix qualified ids in the ':' locator filter
* Always display qualified ids in the ':' filter * Show correct qualified ids (for some symbols the namespace was shown twice) Task-number: QTCREATORBUG-10136 Change-Id: Id178cb4b8abcc316250fa16e5f3e5a8e72bc0c10 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
@@ -95,21 +95,9 @@ bool SearchSymbols::visit(Function *symbol)
|
||||
{
|
||||
if (!(symbolsToSearchFor & SymbolSearcher::Functions))
|
||||
return false;
|
||||
|
||||
QString extraScope;
|
||||
if (const Name *name = symbol->name()) {
|
||||
if (const QualifiedNameId *q = name->asQualifiedNameId()) {
|
||||
if (q->base())
|
||||
extraScope = overview.prettyName(q->base());
|
||||
}
|
||||
}
|
||||
QString fullScope = _scope;
|
||||
if (!_scope.isEmpty() && !extraScope.isEmpty())
|
||||
fullScope += QLatin1String("::");
|
||||
fullScope += extraScope;
|
||||
QString name = symbolName(symbol);
|
||||
QString type = overview.prettyType(symbol->type());
|
||||
appendItem(name, type, fullScope, ModelItemInfo::Method, symbol);
|
||||
appendItem(name, type, _scope, ModelItemInfo::Method, symbol);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user