forked from qt-creator/qt-creator
Locator on Linux/Mac: Show ~ instead of $HOME in paths.
With this, you will see more of the "relevant" path. Change-Id: I03c4c7bd2bdaa9148c70a68678306e259f9c7204 Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
@@ -33,10 +33,12 @@
|
||||
|
||||
#include <texteditor/itexteditor.h>
|
||||
#include <texteditor/basetexteditor.h>
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
#include <QStringMatcher>
|
||||
|
||||
using namespace CppTools::Internal;
|
||||
using namespace Utils;
|
||||
|
||||
CppLocatorFilter::CppLocatorFilter(CppModelManager *manager)
|
||||
: m_manager(manager),
|
||||
@@ -103,10 +105,12 @@ QList<Locator::FilterEntry> CppLocatorFilter::matchesFor(QFutureInterface<Locato
|
||||
|
||||
QVariant id = qVariantFromValue(info);
|
||||
Locator::FilterEntry filterEntry(this, info.symbolName, id, info.icon);
|
||||
if (! info.symbolType.isEmpty())
|
||||
if (! info.symbolType.isEmpty()) {
|
||||
filterEntry.extraInfo = info.symbolType;
|
||||
else
|
||||
filterEntry.extraInfo = info.fileName;
|
||||
} else {
|
||||
filterEntry.extraInfo = FileUtils::shortNativePath(
|
||||
FileName::fromString(info.fileName));
|
||||
}
|
||||
|
||||
if (info.symbolName.startsWith(entry))
|
||||
betterEntries.append(filterEntry);
|
||||
|
||||
Reference in New Issue
Block a user