WebAssembly: Ensure that the device is created after the kits are loaded

That way, the device of the WebAssembly Kit is correctly set if device
type and device of the kit were previously wrong.

Task-number: QTCREATORBUG-23360
Change-Id: I40b6650ede2e632fe5cc7cb27b576de8d1bfd066
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Christian Kandeler
2019-12-12 17:47:33 +01:00
parent 49da199b10
commit c2bfdff70b

View File

@@ -35,6 +35,7 @@
#include <coreplugin/icore.h>
#include <projectexplorer/devicesupport/devicemanager.h>
#include <projectexplorer/kitmanager.h>
using namespace ProjectExplorer;
@@ -80,7 +81,9 @@ bool WebAssemblyPlugin::initialize(const QStringList& arguments, QString* errorS
void WebAssemblyPlugin::extensionsInitialized()
{
ProjectExplorer::DeviceManager::instance()->addDevice(WebAssemblyDevice::create());
connect(KitManager::instance(), &KitManager::kitsLoaded, this, [] {
DeviceManager::instance()->addDevice(WebAssemblyDevice::create());
});
}
} // namespace Internal