diff options
Diffstat (limited to 'src/settingsui')
-rw-r--r-- | src/settingsui/bluetooth/Bluetooth.qml | 14 | ||||
-rw-r--r-- | src/settingsui/bluetooth/Discovery.qml | 2 |
2 files changed, 14 insertions, 2 deletions
diff --git a/src/settingsui/bluetooth/Bluetooth.qml b/src/settingsui/bluetooth/Bluetooth.qml index 309f978..72b4ae6 100644 --- a/src/settingsui/bluetooth/Bluetooth.qml +++ b/src/settingsui/bluetooth/Bluetooth.qml @@ -47,6 +47,7 @@ Item { title: qsTr("Bluetooth status") Layout.fillWidth: true Layout.alignment: Qt.AlignTop + enabled: BtDevice.available RowLayout { spacing: 10 @@ -56,8 +57,19 @@ Item { } Switch { checked: BtDevice.powered - onCheckedChanged: BtDevice.powered = checked + onCheckedChanged: { + BtDevice.powered = checked + } } + + Connections { + target: BtDevice + onPoweredChanged: { + if (BtDevice.powered) + BtDevice.scanning = true + } + } + Label { text: qsTr("On") } diff --git a/src/settingsui/bluetooth/Discovery.qml b/src/settingsui/bluetooth/Discovery.qml index 4daa469..1b3184a 100644 --- a/src/settingsui/bluetooth/Discovery.qml +++ b/src/settingsui/bluetooth/Discovery.qml @@ -82,7 +82,7 @@ Item { anchors.left: parent.left anchors.top: parent.top anchors.topMargin: 4 - source: mainList.getIcon(deviceType) + source: mainList.getIcon(type) } Column { id: column |