From 1644ed5e195bcee0ce32d14574480283af6c3d36 Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Sat, 26 Jul 2025 17:02:35 -0700 Subject: [PATCH] bluetooth: do not try to enable rfkilled devices Bluez will not do this and reports a property change failure. --- src/bluetooth/adapter.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/bluetooth/adapter.cpp b/src/bluetooth/adapter.cpp index 92ab8379..0d8a3192 100644 --- a/src/bluetooth/adapter.cpp +++ b/src/bluetooth/adapter.cpp @@ -53,6 +53,12 @@ QString BluetoothAdapter::adapterId() const { void BluetoothAdapter::setEnabled(bool enabled) { if (enabled == this->bEnabled) return; + + if (enabled && this->bState == BluetoothAdapterState::Blocked) { + qCCritical(logAdapter) << "Cannot enable adapter because it is blocked by rfkill."; + return; + } + this->bEnabled = enabled; this->pEnabled.write(); }