- // Add the scanned devices to the main list, set display names and sort.
- for (shared_ptr<sigrok::HardwareDevice> device : devices) {
- const shared_ptr<devices::HardwareDevice> d(
- new devices::HardwareDevice(context_, device));
- driver_devices.push_back(d);
- }
+ // Add the scanned devices to the main list, set display names and sort.
+ for (shared_ptr<sigrok::HardwareDevice>& device : devices) {
+ const shared_ptr<devices::HardwareDevice> d(
+ new devices::HardwareDevice(context_, device));
+ driver_devices.push_back(d);
+ }
+
+ devices_.insert(devices_.end(), driver_devices.begin(),
+ driver_devices.end());
+ devices_.sort(bind(&DeviceManager::compare_devices, this, _1, _2));
+ driver_devices.sort(bind(
+ &DeviceManager::compare_devices, this, _1, _2));