- BOOST_FOREACH(sr_dev_inst *const sdi, devices) {
-
- QString text;
- if (sdi->vendor && sdi->vendor[0])
- text += QString("%1 ").arg(sdi->vendor);
- if (sdi->model && sdi->model[0])
- text += QString("%1 ").arg(sdi->model);
- if (sdi->version && sdi->version[0])
- text += QString("%1 ").arg(sdi->version);
- if (sdi->probes) {
- text += QString("with %1 probes").arg(
- g_slist_length(sdi->probes));
+ for (shared_ptr<device::Device> dev_inst : devices)
+ {
+ assert(dev_inst);
+ const sr_dev_inst *const sdi = dev_inst->dev_inst();
+ assert(sdi);
+
+ const string title = dev_inst->format_device_title();
+ QString text = QString::fromUtf8(title.c_str());
+
+ if (sdi->channels) {
+ text += QString(" with %1 channels").arg(
+ g_slist_length(sdi->channels));