diff --git a/src/plugins/projectexplorer/projectconfiguration.cpp b/src/plugins/projectexplorer/projectconfiguration.cpp index 464d3ba5c19..92e77dc89f8 100644 --- a/src/plugins/projectexplorer/projectconfiguration.cpp +++ b/src/plugins/projectexplorer/projectconfiguration.cpp @@ -24,6 +24,8 @@ ****************************************************************************/ #include "projectconfiguration.h" + +#include "kitinformation.h" #include "target.h" #include @@ -33,6 +35,7 @@ #include using namespace ProjectExplorer; +using namespace Utils; const char CONFIGURATION_ID_KEY[] = "ProjectExplorer.ProjectConfiguration.Id"; const char DISPLAY_NAME_KEY[] = "ProjectExplorer.ProjectConfiguration.DisplayName"; @@ -142,6 +145,13 @@ void ProjectConfiguration::acquaintAspects() aspect->acquaintSiblings(m_aspects); } +FilePath ProjectConfiguration::mapFromBuildDeviceToGlobalPath(const FilePath &path) const +{ + IDevice::ConstPtr dev = BuildDeviceKitAspect::device(kit()); + QTC_ASSERT(dev, return path); + return dev->mapToGlobalPath(path); +} + Utils::Id ProjectExplorer::idFromMap(const QVariantMap &map) { return Utils::Id::fromSetting(map.value(QLatin1String(CONFIGURATION_ID_KEY))); diff --git a/src/plugins/projectexplorer/projectconfiguration.h b/src/plugins/projectexplorer/projectconfiguration.h index 20200daa82f..a6d17329739 100644 --- a/src/plugins/projectexplorer/projectconfiguration.h +++ b/src/plugins/projectexplorer/projectconfiguration.h @@ -89,6 +89,8 @@ public: void acquaintAspects(); + Utils::FilePath mapFromBuildDeviceToGlobalPath(const Utils::FilePath &path) const; + signals: void displayNameChanged(); void toolTipChanged();