mirror of https://github.com/nymea/nymea.git
Don't load devices if the plugin dropped support for it
parent
4b890429fa
commit
abdfce129e
|
|
@ -1142,6 +1142,12 @@ void DeviceManagerImplementation::loadConfiguredDevices()
|
|||
continue;
|
||||
}
|
||||
|
||||
// Cross-check if this plugin still implements this device class
|
||||
if (!plugin->supportedDevices().contains(deviceClass)) {
|
||||
qCWarning(dcDeviceManager()) << "Not loading device" << deviceName << idString << "because plugin" << plugin->pluginName() << "has removed support for it.";
|
||||
settings.endGroup(); // DeviceId
|
||||
continue;
|
||||
}
|
||||
Device *device = new Device(plugin, deviceClass, DeviceId(idString), this);
|
||||
device->m_autoCreated = settings.value("autoCreated").toBool();
|
||||
device->setName(deviceName);
|
||||
|
|
|
|||
Loading…
Reference in New Issue