ProjectExplorer: Do not auto-remove customized run configurations

Until now, it could easily happen that a user's carefully fine-tuned run
configurations disappeared just because of e.g. a temporarily broken
build system file or simply a switch to a different build configuration.
As this is clearly not acceptable, we now make sure customized run
configurations are not thrown away even when there is currently no
matching factory for them.

Fixes: QTCREATORBUG-23163
Fixes: QTCREATORBUG-28273
Change-Id: Ic011a650d15a2897108df986c7e9fe410852e926
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Kandeler
2023-06-27 16:26:56 +02:00
parent 1cbd417906
commit b1876052bd
8 changed files with 69 additions and 10 deletions

View File

@@ -22,6 +22,7 @@ public:
QString value() const;
QString defaultValue() const { return m_defaultValue; }
bool usesDefaultValue() const;
void forceSerialization() { m_forceSerialization = true; }
void toMap(QVariantMap &map, const QString &key) const;
void fromMap(const QVariantMap &map, const QString &key);
@@ -29,6 +30,7 @@ public:
private:
QString m_value;
QString m_defaultValue;
bool m_forceSerialization = false;
};
bool QTCREATOR_UTILS_EXPORT operator==(const DisplayName &dn1, const DisplayName &dn2);