From 3101d7ce6aa5695e7427620a43221036ad5c187b Mon Sep 17 00:00:00 2001 From: zhanghongyuan Date: Thu, 5 Feb 2026 14:56:24 +0800 Subject: [PATCH] fix(bluetooth): fix audio-headphones device type support Correct typo "autio-headphones" to "audio-headphones" in device type check and add corresponding icon mapping to ensure proper display and handling of audio headphone devices. log: fix audio-headphones device type support bug: PMS-285835 --- src/plugin-bluetooth/operation/bluetoothdevice.h | 1 + src/plugin-bluetooth/operation/bluetoothworker.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugin-bluetooth/operation/bluetoothdevice.h b/src/plugin-bluetooth/operation/bluetoothdevice.h index a00277f9ae..b92d121b2b 100644 --- a/src/plugin-bluetooth/operation/bluetoothdevice.h +++ b/src/plugin-bluetooth/operation/bluetoothdevice.h @@ -23,6 +23,7 @@ static const QMap deviceType2Icon { {"input-tablet","bluetooth_touchpad"}, {"audio-card","bluetooth_pheadset"}, {"audio-headset","bluetooth_clang"}, + {"audio-headphones","bluetooth_headset"}, {"network-wireless","bluetooth_lan"}, {"camera-video","bluetooth_vidicon"}, {"printer","bluetooth_print"}, diff --git a/src/plugin-bluetooth/operation/bluetoothworker.cpp b/src/plugin-bluetooth/operation/bluetoothworker.cpp index 56f8a81646..88c2ed8ab5 100644 --- a/src/plugin-bluetooth/operation/bluetoothworker.cpp +++ b/src/plugin-bluetooth/operation/bluetoothworker.cpp @@ -271,7 +271,7 @@ void BluetoothWorker::connectDevice(const QString &deviceId, const QString adapt const BluetoothDevice *device = adapter->deviceById(deviceId); if (device - && (device->deviceType() == "audio-headset" || device->deviceType() == "autio-headphones") + && (device->deviceType() == "audio-headset" || device->deviceType() == "audio-headphones") && device->state() == BluetoothDevice::StateAvailable) { return; }