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:
Nikolai Kosjar
2013-09-12 14:06:36 +02:00
parent feef5cac4c
commit 91dbac0303
7 changed files with 90 additions and 43 deletions

View File

@@ -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;
}