forked from qt-creator/qt-creator
ProjectExplorer: Add ProjectConfiguration::mapFromBuildDeviceToGlobalPath
A convenience function to help making buildsteps etc. work with container setups. Change-Id: I0aca129ee0ed4eb70c7ec9dcebead42b73651dc3 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -24,6 +24,8 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "projectconfiguration.h"
|
||||
|
||||
#include "kitinformation.h"
|
||||
#include "target.h"
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
@@ -33,6 +35,7 @@
|
||||
#include <QWidget>
|
||||
|
||||
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)));
|
||||
|
@@ -89,6 +89,8 @@ public:
|
||||
|
||||
void acquaintAspects();
|
||||
|
||||
Utils::FilePath mapFromBuildDeviceToGlobalPath(const Utils::FilePath &path) const;
|
||||
|
||||
signals:
|
||||
void displayNameChanged();
|
||||
void toolTipChanged();
|
||||
|
Reference in New Issue
Block a user