Commit 473efb9d authored by con's avatar con
Browse files

Show "default device" checkmark instead of comboboxes on Windows

parent 11b93e8f
......@@ -108,13 +108,17 @@ void S60DevicesModel::appendDevice(const S60Devices::Device &device)
const Qt::ItemFlags flags = Qt::ItemIsEnabled|Qt::ItemIsSelectable;
QStandardItem *defaultItem = new QStandardItem;
defaultItem->setCheckable(true);
defaultItem->setCheckState(device.isDefault ? Qt::Checked : Qt::Unchecked);
// Item is only checkable if it is not the default.
Qt::ItemFlags checkFlags = flags;
if (!device.isDefault && m_defaultColumnCheckable)
checkFlags |= Qt::ItemIsUserCheckable;
defaultItem->setFlags(checkFlags);
if (m_defaultColumnCheckable) {
defaultItem->setCheckable(true);
defaultItem->setCheckState(device.isDefault ? Qt::Checked : Qt::Unchecked);
// Item is only checkable if it is not the default.
Qt::ItemFlags checkFlags = flags;
if (!device.isDefault)
checkFlags |= Qt::ItemIsUserCheckable;
defaultItem->setFlags(checkFlags);
} else {
defaultItem->setIcon(device.isDefault ? QIcon(QLatin1String(":/extensionsystem/images/ok.png")) : QIcon());
}
defaultItem->setData(deviceData);
......
Supports Markdown
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