forked from qt-creator/qt-creator
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:
@@ -43,11 +43,6 @@ Id ProjectConfiguration::id() const
|
|||||||
return m_id;
|
return m_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
Key ProjectConfiguration::settingsIdKey()
|
|
||||||
{
|
|
||||||
return CONFIGURATION_ID_KEY;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ProjectConfiguration::setDisplayName(const QString &name)
|
void ProjectConfiguration::setDisplayName(const QString &name)
|
||||||
{
|
{
|
||||||
if (m_displayName.setValue(name))
|
if (m_displayName.setValue(name))
|
||||||
|
@@ -53,8 +53,6 @@ public:
|
|||||||
Project *project() const;
|
Project *project() const;
|
||||||
Kit *kit() const;
|
Kit *kit() const;
|
||||||
|
|
||||||
static Utils::Key settingsIdKey();
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void displayNameChanged();
|
void displayNameChanged();
|
||||||
void toolTipChanged();
|
void toolTipChanged();
|
||||||
|
@@ -311,13 +311,8 @@ void RunConfiguration::toMap(Store &map) const
|
|||||||
void RunConfiguration::toMapSimple(Store &map) const
|
void RunConfiguration::toMapSimple(Store &map) const
|
||||||
{
|
{
|
||||||
ProjectConfiguration::toMap(map);
|
ProjectConfiguration::toMap(map);
|
||||||
|
QTC_CHECK(!m_buildKey.isEmpty());
|
||||||
map.insert(BUILD_KEY, m_buildKey);
|
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)
|
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_customized = m_customized || map.value(CUSTOMIZED_KEY, false).toBool();
|
||||||
m_buildKey = map.value(BUILD_KEY).toString();
|
m_buildKey = map.value(BUILD_KEY).toString();
|
||||||
|
QTC_CHECK(!m_buildKey.isEmpty());
|
||||||
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());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
Reference in New Issue
Block a user