aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/ios/iosrunconfiguration.cpp
diff options
context:
space:
mode:
authorhjk <[email protected]>2018-04-09 12:33:10 +0200
committerhjk <[email protected]>2018-04-12 12:11:45 +0000
commitbc698d4ce61b95555e1d4ed16cd0d609e7e295e8 (patch)
tree9ecb48aa27ade853f6d1bae246ce1a01ef903b93 /src/plugins/ios/iosrunconfiguration.cpp
parent4ab7c19e848701b666a720d85bf5b63fa34a2ce6 (diff)
ProjectExplorer: Consolidate RunConfiguration identifications
The previously per-Project/RunConfiguration changing meanings of BuildTargetInfo::buildTarget have by now been split into separate values in BuildTargetInfo: - buildKey a handle to one item in Target::applicationTargetList - displayName a user-visible string in the run settings page The buildKey was tweaked to coincide with the previous 'extraId', i.e. the non-RunConfiguration-type part of the project configuration id that (still) use id mangling. This allows replacing the cases of locally stored seven different versions of buildKey(-ish) data by one RunConfiguration::m_buildKey, and do all remaining extraId handling in RC::{from,to}Map only, i.e. remove the base ProjectConfiguration::extraId() virtual and remove the "re-try fromMap with mangled id" hack entirely. The id mangling is still used to temporarily maintain .user file compatibility in some cases for now, but should be replaced by storing the build key and the RunConfiguration type soon. Qbs already changes in here to only use the uniqueProductName as buildKey, without the previously added display name which is stored as part of the ProjectConfiguration already. It turns out that RunConfiguration::buildSystemTarget was intended and used to retrieve an item from the Target::applicationTargetList for some configurations, coinciding with what buildKey does always. So use that insteand and drop RunConfiguration::buildSystemTarget. There is clearly is further consolidation potential left. handling of (default)displayNames is still a per-runconfiguration mess and there is further consolidation potential left. Change-Id: I448ed30f1b562fb91b970e328a42fa5f6fb2e43e Reviewed-by: Tobias Hunger <[email protected]>
Diffstat (limited to 'src/plugins/ios/iosrunconfiguration.cpp')
-rw-r--r--src/plugins/ios/iosrunconfiguration.cpp22
1 files changed, 2 insertions, 20 deletions
diff --git a/src/plugins/ios/iosrunconfiguration.cpp b/src/plugins/ios/iosrunconfiguration.cpp
index ed62de936f1..2bff2bbbfca 100644
--- a/src/plugins/ios/iosrunconfiguration.cpp
+++ b/src/plugins/ios/iosrunconfiguration.cpp
@@ -104,11 +104,6 @@ IosRunConfiguration::IosRunConfiguration(Target *target)
this, &IosRunConfiguration::deviceChanges);
}
-QString IosRunConfiguration::extraId() const
-{
- return m_profilePath.toString();
-}
-
void IosRunConfiguration::deviceChanges()
{
updateDisplayNames();
@@ -159,7 +154,7 @@ void IosRunConfiguration::updateEnabledState()
bool IosRunConfiguration::canRunForNode(const Node *node) const
{
- return node->filePath() == m_profilePath;
+ return node->filePath() == profilePath();
}
IosDeployStep *IosRunConfiguration::deployStep() const
@@ -170,7 +165,7 @@ IosDeployStep *IosRunConfiguration::deployStep() const
FileName IosRunConfiguration::profilePath() const
{
- return m_profilePath;
+ return FileName::fromString(buildKey());
}
static QmakeProFile *proFile(const IosRunConfiguration *rc)
@@ -247,9 +242,6 @@ bool IosRunConfiguration::fromMap(const QVariantMap &map)
if (!RunConfiguration::fromMap(map))
return false;
- QString extraId = idFromMap(map).suffixAfter(id());
- m_profilePath = Utils::FileName::fromString(extraId);
-
bool deviceTypeIsInt;
map.value(deviceTypeKey).toInt(&deviceTypeIsInt);
if (deviceTypeIsInt || !m_deviceType.fromMap(map.value(deviceTypeKey).toMap())) {
@@ -263,11 +255,6 @@ bool IosRunConfiguration::fromMap(const QVariantMap &map)
return true;
}
-void IosRunConfiguration::doAdditionalSetup(const RunConfigurationCreationInfo &info)
-{
- m_profilePath = Utils::FileName::fromString(info.buildKey);
-}
-
QVariantMap IosRunConfiguration::toMap() const
{
QVariantMap res = RunConfiguration::toMap();
@@ -275,11 +262,6 @@ QVariantMap IosRunConfiguration::toMap() const
return res;
}
-QString IosRunConfiguration::buildSystemTarget() const
-{
- return m_profilePath.toString();
-}
-
QString IosRunConfiguration::disabledReason() const
{
Core::Id devType = DeviceTypeKitInformation::deviceTypeId(target()->kit());