Skip to content
Snippets Groups Projects
Commit adc7d65c authored by Aurindam Jana's avatar Aurindam Jana
Browse files

DeviceManager: Fix regression introduced by change id I38e4ea9da92


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

Change-Id: Iee0d1d102a8ff0855fb855fbde512f9a7f9ecee2
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@digia.com>
parent 036d977b
Branches
Tags
No related merge requests found
...@@ -163,10 +163,11 @@ void DeviceManager::load() ...@@ -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) ...@@ -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;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment