From 455402d640a77fcfa67178d1302881c428a04344 Mon Sep 17 00:00:00 2001 From: donghualin Date: Wed, 7 Dec 2022 18:19:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E9=80=9A=E8=BF=87=E8=93=9D=E7=89=99=E4=B8=BB=E9=9D=A2=E6=9D=BF?= =?UTF-8?q?=E5=BC=80=E5=90=AF=E5=85=B3=E9=97=AD=E8=93=9D=E7=89=99=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 开启和关闭蓝牙通过调用AdaptersManager类的setAdapterPowered接口来实现 Log: 修复开启关闭蓝牙失败的问题 Influence: 打开快捷面板,点击蓝牙图标,观察蓝牙是否正常开启和关闭 Bug: https://pms.uniontech.com/bug-view-171419.html Change-Id: I6f2acfded7a90e3454f507118224e5179a726fb8 --- plugins/bluetooth/bluetoothmainwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/bluetooth/bluetoothmainwidget.cpp b/plugins/bluetooth/bluetoothmainwidget.cpp index ab8649af2..b110bbf58 100644 --- a/plugins/bluetooth/bluetoothmainwidget.cpp +++ b/plugins/bluetooth/bluetoothmainwidget.cpp @@ -83,7 +83,7 @@ bool BluetoothMainWidget::eventFilter(QObject *watcher, QEvent *event) case QEvent::MouseButtonRelease: { bool status = !(isOpen()); for (const Adapter *adapter : m_adapterManager->adapters()) - const_cast(adapter)->setPowered(status); + m_adapterManager->setAdapterPowered(adapter, status); return true; }