Partially decouple local CMakeRunConfiguration from CMakeProject

Funnel all relevant data through target.applicationTargets() as
done for the non-local CMake-supporting setups and QBS already.

There is cleanup potential left for later changes.

Change-Id: I49ed6abd98c058a7fd1545e41b3bcd6ecb758a8b
Task-number: QTCREATORBUG-19985
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
hjk
2018-03-12 16:33:28 +01:00
parent 3f86d55587
commit a5d6fe33cb
9 changed files with 43 additions and 87 deletions

View File

@@ -550,7 +550,7 @@ RunConfiguration *RunConfigurationCreationInfo::create(Target *target) const
QTC_ASSERT(factory->canHandle(target), return nullptr);
QTC_ASSERT(id == factory->runConfigurationBaseId(), return nullptr);
if (!factory->canCreateHelper(target, extra))
if (!factory->canCreateHelper(target, targetName))
return nullptr;
QTC_ASSERT(factory->m_creator, return nullptr);
@@ -560,9 +560,9 @@ RunConfiguration *RunConfigurationCreationInfo::create(Target *target) const
// "FIX" ids by mangling in the extra data (build system target etc)
// for compatibility for the current format used in settings.
if (!extra.isEmpty()) {
if (!targetName.isEmpty()) {
QVariantMap data = rc->toMap();
data[ProjectConfiguration::settingsIdKey()] = id.withSuffix(extra).toString();
data[ProjectConfiguration::settingsIdKey()] = id.withSuffix(targetName).toString();
rc->fromMap(data);
}