From c2bfdff70b4d539e719d7eb78a59ed4214b683f4 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Thu, 12 Dec 2019 17:47:33 +0100 Subject: [PATCH] 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 --- src/plugins/webassembly/webassemblyplugin.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugins/webassembly/webassemblyplugin.cpp b/src/plugins/webassembly/webassemblyplugin.cpp index 97b4ca4ebcb..497efeb7222 100644 --- a/src/plugins/webassembly/webassemblyplugin.cpp +++ b/src/plugins/webassembly/webassemblyplugin.cpp @@ -35,6 +35,7 @@ #include #include +#include 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