DeviceManager: Fix regression introduced by change id I38e4ea9da92

DeviceManager::fromMap() returned empty list of devices.

Change-Id: Iee0d1d102a8ff0855fb855fbde512f9a7f9ecee2
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
This commit is contained in:
Aurindam Jana
2013-04-04 08:49:30 +02:00
parent 036d977b93
commit adc7d65ca6

View File

@@ -163,10 +163,11 @@ void DeviceManager::load()
break; break;
} }
} }
d->devices << device; addDevice(device);
} }
// Append the new SDK devices to the model. // Append the new SDK devices to the model.
d->devices << sdkDevices; foreach (const IDevice::Ptr &sdkDevice, sdkDevices)
addDevice(sdkDevice);
ensureOneDefaultDevicePerType(); ensureOneDefaultDevicePerType();
@@ -189,7 +190,7 @@ QList<IDevice::Ptr> DeviceManager::fromMap(const QVariantMap &map)
continue; continue;
const IDevice::Ptr device = factory->restore(map); const IDevice::Ptr device = factory->restore(map);
QTC_ASSERT(device, continue); QTC_ASSERT(device, continue);
addDevice(device); devices << device;
} }
return devices; return devices;
} }