diff options
Diffstat (limited to 'src/plugins/projectexplorer')
-rw-r--r-- | src/plugins/projectexplorer/runconfiguration.cpp | 7 | ||||
-rw-r--r-- | src/plugins/projectexplorer/target.cpp | 5 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/plugins/projectexplorer/runconfiguration.cpp b/src/plugins/projectexplorer/runconfiguration.cpp index 549f98e230..2c2394c7e3 100644 --- a/src/plugins/projectexplorer/runconfiguration.cpp +++ b/src/plugins/projectexplorer/runconfiguration.cpp @@ -356,9 +356,14 @@ bool RunConfiguration::fromMap(const QVariantMap &map) m_buildKey = map.value(BUILD_KEY).toString(); if (m_buildKey.isEmpty()) { - // FIXME: Remove this id mangling, e.g. by using a separate entry for the build key. const Core::Id mangledId = Core::Id::fromSetting(map.value(settingsIdKey())); m_buildKey = mangledId.suffixAfter(id()); + + // Hack for cmake projects 4.10 -> 4.11. + const QString magicSeparator = "///::///"; + const int magicIndex = m_buildKey.indexOf(magicSeparator); + if (magicIndex != -1) + m_buildKey = m_buildKey.mid(magicIndex + magicSeparator.length()); } return true; diff --git a/src/plugins/projectexplorer/target.cpp b/src/plugins/projectexplorer/target.cpp index b9f92741d2..ecddc0d977 100644 --- a/src/plugins/projectexplorer/target.cpp +++ b/src/plugins/projectexplorer/target.cpp @@ -867,7 +867,10 @@ bool Target::fromMap(const QVariantMap &map) RunConfiguration *rc = RunConfigurationFactory::restore(this, valueMap); if (!rc) continue; - QTC_CHECK(rc->id().withSuffix(rc->buildKey()) == ProjectExplorer::idFromMap(valueMap)); + const Core::Id theIdFromMap = ProjectExplorer::idFromMap(valueMap); + if (!theIdFromMap.toString().contains("///::///")) { // Hack for cmake 4.10 -> 4.11 + QTC_CHECK(rc->id().withSuffix(rc->buildKey()) == theIdFromMap); + } addRunConfiguration(rc); if (i == activeConfiguration) setActiveRunConfiguration(rc); |