ProjectExplorer: Remove id/buildkey mangling support for runconfig

This was used for qmake and cmake up to Creator 4.11 (Dec 2019).
Projects created or touched afterwards are unharmed.

Projects created before that and not touched since then will lose
runconfigurations.

Change-Id: I745aa3641749462a0420df6f658055a78fd52c8e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2023-06-30 12:56:18 +02:00
parent 6b31ff2960
commit 07df45cdeb
3 changed files with 2 additions and 24 deletions

View File

@@ -43,11 +43,6 @@ Id ProjectConfiguration::id() const
return m_id;
}
Key ProjectConfiguration::settingsIdKey()
{
return CONFIGURATION_ID_KEY;
}
void ProjectConfiguration::setDisplayName(const QString &name)
{
if (m_displayName.setValue(name))

View File

@@ -53,8 +53,6 @@ public:
Project *project() const;
Kit *kit() const;
static Utils::Key settingsIdKey();
signals:
void displayNameChanged();
void toolTipChanged();

View File

@@ -311,13 +311,8 @@ void RunConfiguration::toMap(Store &map) const
void RunConfiguration::toMapSimple(Store &map) const
{
ProjectConfiguration::toMap(map);
QTC_CHECK(!m_buildKey.isEmpty());
map.insert(BUILD_KEY, m_buildKey);
// FIXME: Remove this id mangling, e.g. by using a separate entry for the build key.
if (!m_buildKey.isEmpty()) {
const Utils::Id mangled = id().withSuffix(m_buildKey);
map.insert(settingsIdKey(), mangled.toSetting());
}
}
void RunConfiguration::setCommandLineGetter(const CommandLineGetter &cmdGetter)
@@ -377,17 +372,7 @@ void RunConfiguration::fromMap(const Store &map)
m_customized = m_customized || map.value(CUSTOMIZED_KEY, false).toBool();
m_buildKey = map.value(BUILD_KEY).toString();
if (m_buildKey.isEmpty()) {
const Utils::Id mangledId = Utils::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());
}
QTC_CHECK(!m_buildKey.isEmpty());
}
/*!