forked from qt-creator/qt-creator
KitInformation: Fix warning about invalid devices
Do not warn if no device is set at all: No device is a valid value, no reason to warn about that. Change-Id: I2aaedb54b6400a4c7d2c711a0d004b33aba0c4cb Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
@@ -357,11 +357,10 @@ QList<Task> DeviceKitInformation::validate(const Kit *k) const
|
|||||||
void DeviceKitInformation::fix(Kit *k)
|
void DeviceKitInformation::fix(Kit *k)
|
||||||
{
|
{
|
||||||
IDevice::ConstPtr dev = DeviceKitInformation::device(k);
|
IDevice::ConstPtr dev = DeviceKitInformation::device(k);
|
||||||
if (!dev.isNull() && dev->type() == DeviceTypeKitInformation::deviceTypeId(k))
|
if (!dev.isNull() && dev->type() != DeviceTypeKitInformation::deviceTypeId(k)) {
|
||||||
return;
|
qWarning("Device is no longer known, removing from kit \"%s\".", qPrintable(k->displayName()));
|
||||||
|
setDeviceId(k, Core::Id());
|
||||||
qWarning("Device is no longer known, removing from kit \"%s\".", qPrintable(k->displayName()));
|
}
|
||||||
setDeviceId(k, Core::Id());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeviceKitInformation::setup(Kit *k)
|
void DeviceKitInformation::setup(Kit *k)
|
||||||
|
|||||||
Reference in New Issue
Block a user