From 101dec15ca6d89e1e4849f7fd60788287c5c04e6 Mon Sep 17 00:00:00 2001 From: kamiyadm <61131058+kamiyadm@users.noreply.github.com> Date: Wed, 5 Jul 2023 10:28:18 +0800 Subject: [PATCH] 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 --- plugins/sound/sounddeviceswidget.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/sound/sounddeviceswidget.cpp b/plugins/sound/sounddeviceswidget.cpp index 4b7fe2d0d..834a9d6d1 100644 --- a/plugins/sound/sounddeviceswidget.cpp +++ b/plugins/sound/sounddeviceswidget.cpp @@ -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(port), DeviceObjRole);