Commit b646c37f authored by hjk's avatar hjk
Browse files

Device support: Replace use of Id::toUniqueIdentifier.

Was paired with QVariant::value<Core::Id> which relied on the unique
dentifier being exactly the internal representation of the Id.

Change-Id: Ib660b4b640bcef2803e2e050045d2189d6352d40
Reviewed-by: default avatarTobias Hunger <>
parent 8c583cb3
......@@ -87,7 +87,7 @@ Core::Id DeviceFactorySelectionDialog::selectedId() const
QList<QListWidgetItem *> selected = ui->listWidget->selectedItems();
if (selected.isEmpty())
return Core::Id();
return Core::Id::fromSetting(>data(Qt::UserRole));
} // namespace Internal
......@@ -169,7 +169,7 @@ QVariant DeviceManagerModel::data(const QModelIndex &index, int role) const
return QVariant();
const IDevice::ConstPtr dev = device(index.row());
if (role == Qt::UserRole)
return dev->id().uniqueIdentifier();
return dev->id().toSetting();
QString name;
if (d->deviceManager->defaultDevice(dev->type()) == dev)
name = tr("%1 (default for %2)").arg(dev->displayName(), dev->displayType());
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment