Commit 30df59af authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Show appropriate message when no bluetooth adapter is available

When bluetooth is blocked the manager doesn't show any adapters. Therefore the message is only shown when the rfkill state is unknown, which is the case when no bluetooth hardware is present.

Depends on frameworks/bluez-qt!5

BUG: 426776
parent 38ac9068
......@@ -37,7 +37,15 @@ ScrollViewKCM {
clip: true
Kirigami.PlaceholderMessage {
visible: !BluezQt.Manager.bluetoothOperational
id: noBluetoothMessage
visible: !BluezQt.Manager.rfkill.state === BluezQt.Rfkill.Unknown && BluezQt.Manager.adapters.length === 0
text: i18n("No Bluetooth adapters found")
width: parent.width - (Kirigami.Units.largeSpacing * 4)
anchors.centerIn: parent
Kirigami.PlaceholderMessage {
visible: !BluezQt.Manager.bluetoothOperational && !noBluetoothMessage.visible
text: i18n("Bluetooth is disabled")
width: parent.width - (Kirigami.Units.largeSpacing * 4)
anchors.centerIn: parent
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment