McuSupport: Remove outdated kits on KitManager::kitsLoaded

... instead while creating other kits.

Task-number: QTCREATORBUG-23891
Change-Id: I7ef3a6c92d94d8e6dd7499490a694be1d91ed35e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Alessandro Portale
2020-05-04 16:34:38 +02:00
parent 67828b4fe5
commit ff925d85e9
2 changed files with 5 additions and 1 deletions

View File

@@ -36,6 +36,7 @@
#include <projectexplorer/devicesupport/devicemanager.h>
#include <projectexplorer/jsonwizard/jsonwizardfactory.h>
#include <projectexplorer/kitmanager.h>
using namespace ProjectExplorer;
@@ -86,6 +87,10 @@ bool McuSupportPlugin::initialize(const QStringList& arguments, QString* errorSt
void McuSupportPlugin::extensionsInitialized()
{
ProjectExplorer::DeviceManager::instance()->addDevice(McuSupportDevice::create());
connect(KitManager::instance(), &KitManager::kitsLoaded, [](){
McuSupportOptions::removeOutdatedKits();
});
}
} // namespace Internal