Hide Bluetooth widgets for systems without Bluetooth (#2167)

This commit is contained in:
end-4
2025-10-12 09:43:10 +02:00
committed by GitHub
4 changed files with 4 additions and 0 deletions
@@ -12,6 +12,7 @@ import QtQuick
Singleton {
id: root
readonly property bool available: Bluetooth.adapters.values.length > 0
readonly property bool enabled: Bluetooth.defaultAdapter?.enabled ?? false
readonly property BluetoothDevice firstActiveDevice: Bluetooth.defaultAdapter?.devices.values.find(device => device.connected) ?? null
readonly property int activeDeviceCount: Bluetooth.defaultAdapter?.devices.values.filter(device => device.connected).length ?? 0