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

@@ -37,7 +37,7 @@ bool DisplayName::usesDefaultValue() const
void DisplayName::toMap(QVariantMap &map, const QString &key) const
{
if (!usesDefaultValue())
if (m_forceSerialization || !usesDefaultValue())
map.insert(key, m_value);
}