forked from qt-creator/qt-creator
ProjectExplorer: Inline mapFromBuildDeviceToGlobalPath
... into its only users. Wasn't so useful as originally thought. Task-number: QTCREATORBUG-29168 Change-Id: Ic10bc29d829f4abfb7bfa6e6d0aecff82ba4538e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
#include "makestep.h"
|
#include "makestep.h"
|
||||||
|
|
||||||
#include "buildconfiguration.h"
|
#include "buildconfiguration.h"
|
||||||
|
#include "devicesupport/idevice.h"
|
||||||
#include "gnumakeparser.h"
|
#include "gnumakeparser.h"
|
||||||
#include "kitinformation.h"
|
#include "kitinformation.h"
|
||||||
#include "processparameters.h"
|
#include "processparameters.h"
|
||||||
@@ -151,8 +152,11 @@ FilePath MakeStep::defaultMakeCommand() const
|
|||||||
const Environment env = makeEnvironment();
|
const Environment env = makeEnvironment();
|
||||||
for (const ToolChain *tc : preferredToolChains(kit())) {
|
for (const ToolChain *tc : preferredToolChains(kit())) {
|
||||||
FilePath make = tc->makeCommand(env);
|
FilePath make = tc->makeCommand(env);
|
||||||
if (!make.isEmpty())
|
if (!make.isEmpty()) {
|
||||||
return mapFromBuildDeviceToGlobalPath(make);
|
IDevice::ConstPtr dev = BuildDeviceKitAspect::device(kit());
|
||||||
|
QTC_ASSERT(dev, return {});
|
||||||
|
return dev->filePath(make.path());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
@@ -6,7 +6,6 @@
|
|||||||
#include "kitinformation.h"
|
#include "kitinformation.h"
|
||||||
#include "target.h"
|
#include "target.h"
|
||||||
|
|
||||||
#include <projectexplorer/devicesupport/idevice.h>
|
|
||||||
#include <utils/algorithm.h>
|
#include <utils/algorithm.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
|
||||||
@@ -108,13 +107,6 @@ bool ProjectConfiguration::fromMap(const QVariantMap &map)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
FilePath ProjectConfiguration::mapFromBuildDeviceToGlobalPath(const FilePath &path) const
|
|
||||||
{
|
|
||||||
IDevice::ConstPtr dev = BuildDeviceKitAspect::device(kit());
|
|
||||||
QTC_ASSERT(dev, return path);
|
|
||||||
return dev->filePath(path.path());
|
|
||||||
}
|
|
||||||
|
|
||||||
Id ProjectExplorer::idFromMap(const QVariantMap &map)
|
Id ProjectExplorer::idFromMap(const QVariantMap &map)
|
||||||
{
|
{
|
||||||
return Id::fromSetting(map.value(QLatin1String(CONFIGURATION_ID_KEY)));
|
return Id::fromSetting(map.value(QLatin1String(CONFIGURATION_ID_KEY)));
|
||||||
|
@@ -54,8 +54,6 @@ public:
|
|||||||
|
|
||||||
static QString settingsIdKey();
|
static QString settingsIdKey();
|
||||||
|
|
||||||
Utils::FilePath mapFromBuildDeviceToGlobalPath(const Utils::FilePath &path) const;
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void displayNameChanged();
|
void displayNameChanged();
|
||||||
void toolTipChanged();
|
void toolTipChanged();
|
||||||
|
Reference in New Issue
Block a user