ProjectExplorer: Make sure kit removal is made persistent

At least one caller deregisters kits so late in the shutdown process
that the final KitManager::saveKits() has already run, so the removed kit
showed up again on the next start.

Fixes: QTCREATORBUG-31461
Change-Id: Ia9ad3f9ee9ba692b866f7105f944b308d7a22693
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Christian Kandeler
2024-08-22 10:29:31 +02:00
parent 9b98d95caa
commit c507666fda

View File

@@ -651,6 +651,10 @@ void KitManager::deregisterKits(const QList<Kit *> kitList)
for (auto it = removed.cbegin(); it != removed.cend(); ++it)
emit instance()->kitRemoved(it->get());
emit instance()->kitsChanged();
// FIXME: TargetSetupPage potentially deregisters kits on destruction, after the final
// ICore::saveSettingsRequested() was emitted.
saveKits();
}
void KitManager::setDefaultKit(Kit *k)