Skip to content
Snippets Groups Projects
Commit 3a0db441 authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer
Browse files

Show the filename of a symbol if it doesn't have additional type info

Helps with disambiguating global functions, for example.
parent b25edbe2
No related branches found
No related tags found
No related merge requests found
...@@ -104,9 +104,14 @@ QList<QuickOpen::FilterEntry> CppQuickOpenFilter::matchesFor(const QString &orig ...@@ -104,9 +104,14 @@ QList<QuickOpen::FilterEntry> CppQuickOpenFilter::matchesFor(const QString &orig
foreach (ModelItemInfo info, items) { foreach (ModelItemInfo info, items) {
if ((hasWildcard && regexp.exactMatch(info.symbolName)) if ((hasWildcard && regexp.exactMatch(info.symbolName))
|| (!hasWildcard && matcher.indexIn(info.symbolName) != -1)) { || (!hasWildcard && matcher.indexIn(info.symbolName) != -1)) {
QVariant id = qVariantFromValue(info); QVariant id = qVariantFromValue(info);
QuickOpen::FilterEntry filterEntry(this, info.symbolName, id, info.icon); QuickOpen::FilterEntry filterEntry(this, info.symbolName, id, info.icon);
filterEntry.extraInfo = info.symbolType; if (! info.symbolType.isEmpty())
filterEntry.extraInfo = info.symbolType;
else
filterEntry.extraInfo = info.fileName;
if (info.symbolName.startsWith(entry)) if (info.symbolName.startsWith(entry))
betterEntries.append(filterEntry); betterEntries.append(filterEntry);
else else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment