mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-01 07:05:48 +00:00
fix: the name of sound device shouldn't be edited (#880)
We can edit the name of sound device in the dock, it should not be happened. Just set the item uneditable. Log: Co-authored-by: kamiyadm <chenhuixing@deepin.org>
This commit is contained in:
parent
fb3f888157
commit
101dec15ca
@ -268,6 +268,7 @@ void SoundDevicesWidget::addPort(const SoundDevicePort *port)
|
||||
// TODO: get right icon
|
||||
portItem->setIcon(QIcon());
|
||||
portItem->setText(deviceName);
|
||||
portItem->setEditable(false);
|
||||
portItem->setFlags(portItem->flags() & ~Qt::ItemIsSelectable);
|
||||
portItem->setTextColorRole(QPalette::BrightText);
|
||||
portItem->setData(QVariant::fromValue<const SoundDevicePort *>(port), DeviceObjRole);
|
||||
|
Loading…
x
Reference in New Issue
Block a user