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:
@@ -37,10 +37,12 @@
|
||||
#include <projectexplorer/target.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <projectexplorer/buildsteplist.h>
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
|
||||
using namespace CMakeProjectManager;
|
||||
using namespace CMakeProjectManager::Internal;
|
||||
using namespace Utils;
|
||||
|
||||
CMakeLocatorFilter::CMakeLocatorFilter()
|
||||
{
|
||||
@@ -74,7 +76,8 @@ QList<Locator::FilterEntry> CMakeLocatorFilter::matchesFor(QFutureInterface<Loca
|
||||
foreach (CMakeBuildTarget ct, cmakeProject->buildTargets()) {
|
||||
if (ct.title.contains(entry)) {
|
||||
Locator::FilterEntry entry(this, ct.title, cmakeProject->document()->fileName());
|
||||
entry.extraInfo = cmakeProject->document()->fileName();
|
||||
entry.extraInfo = FileUtils::shortNativePath(
|
||||
FileName::fromString(cmakeProject->document()->fileName()));
|
||||
result.append(entry);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user