From b1876052bd401bccc816b54f12072548670d5df8 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Tue, 27 Jun 2023 16:26:56 +0200 Subject: 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: Reviewed-by: hjk --- src/plugins/projectexplorer/target.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/plugins/projectexplorer/target.cpp') diff --git a/src/plugins/projectexplorer/target.cpp b/src/plugins/projectexplorer/target.cpp index 82d85f84e5..d2f6b3535e 100644 --- a/src/plugins/projectexplorer/target.cpp +++ b/src/plugins/projectexplorer/target.cpp @@ -706,7 +706,7 @@ void Target::updateDefaultRunConfigurations() present = true; } } - if (!present) + if (!present && !rc->isCustomized()) toRemove.append(rc); } configuredCount -= toRemove.count(); @@ -797,6 +797,8 @@ void Target::updateDefaultRunConfigurations() // Remove the RCs that are no longer needed: for (RunConfiguration *rc : std::as_const(removalList)) removeRunConfiguration(rc); + + emit runConfigurationsUpdated(); } QVariant Target::namedSettings(const QString &name) const -- cgit v1.2.3