Commit 0e27bc5a authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer
Browse files

Exclude anonymous symbols from the QuickOpen

They're not overly useful to have in there, since they don't have a name
you could type to jump to them.

Reviewed-by: Roberto Raggi
parent 9653f4b7
...@@ -153,7 +153,7 @@ bool SearchSymbols::visit(Class *symbol) ...@@ -153,7 +153,7 @@ bool SearchSymbols::visit(Class *symbol)
QString SearchSymbols::scopedSymbolName(const QString &symbolName) const QString SearchSymbols::scopedSymbolName(const QString &symbolName) const
{ {
QString name = _scope; QString name = _scope;
if (! name.isEmpty()) if (!name.isEmpty())
name += QLatin1String("::"); name += QLatin1String("::");
name += symbolName; name += symbolName;
return name; return name;
...@@ -196,6 +196,9 @@ void SearchSymbols::appendItem(const QString &name, ...@@ -196,6 +196,9 @@ void SearchSymbols::appendItem(const QString &name,
ModelItemInfo::ItemType type, ModelItemInfo::ItemType type,
const Symbol *symbol) const Symbol *symbol)
{ {
if (!symbol->name())
const QIcon icon = icons.iconForSymbol(symbol); const QIcon icon = icons.iconForSymbol(symbol);
items.append(ModelItemInfo(name, info, type, items.append(ModelItemInfo(name, info, type,
QString::fromUtf8(symbol->fileName(), symbol->fileNameLength()), QString::fromUtf8(symbol->fileName(), symbol->fileNameLength()),
Supports Markdown
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