also disable the auto device removal protection in the second remove method for now

pull/135/head
Michael Zanetti 2018-04-13 11:50:19 +02:00
parent 5f4e524cca
commit d7476e8064
1 changed files with 5 additions and 4 deletions

View File

@ -264,10 +264,11 @@ DeviceManager::DeviceError NymeaCore::removeConfiguredDevice(const DeviceId &dev
return DeviceManager::DeviceErrorDeviceIsChild;
}
if (device->autoCreated()) {
qCWarning(dcDeviceManager) << "This device has been auto-created and cannot be deleted manually.";
return DeviceManager::DeviceErrorCreationMethodNotSupported;
}
// FIXME: Let's remove this for now. It will come back with more fine grained control, presumably introducing a RemoveMethod flag in the DeviceClass
// if (device->autoCreated()) {
// qCWarning(dcDeviceManager) << "This device has been auto-created and cannot be deleted manually.";
// return DeviceManager::DeviceErrorCreationMethodNotSupported;
// }
// Check if this device has child devices
QList<Device *> devicesToRemove;