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:
Nikolai Kosjar
2012-08-24 15:00:44 +02:00
parent ce9b7bf123
commit 9483408fec
6 changed files with 36 additions and 6 deletions

View File

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