diff options
Diffstat (limited to 'mobile-widgets/qml/DownloadFromDiveComputer.qml')
-rw-r--r-- | mobile-widgets/qml/DownloadFromDiveComputer.qml | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mobile-widgets/qml/DownloadFromDiveComputer.qml b/mobile-widgets/qml/DownloadFromDiveComputer.qml index a4db5ef51..9086a2e0f 100644 --- a/mobile-widgets/qml/DownloadFromDiveComputer.qml +++ b/mobile-widgets/qml/DownloadFromDiveComputer.qml @@ -98,6 +98,14 @@ Kirigami.Page { Layout.fillWidth: true model: connectionListModel currentIndex: -1 + onCurrentTextChanged: { + // pattern that matches BT addresses + var btAddr = /[0-9A-Fa-f][0-9A-Fa-f]:[0-9A-Fa-f][0-9A-Fa-f]:[0-9A-Fa-f][0-9A-Fa-f]:[0-9A-Fa-f][0-9A-Fa-f]:[0-9A-Fa-f][0-9A-Fa-f]:[0-9A-Fa-f][0-9A-Fa-f]/ ; + if (btAddr.test(currentText)) + isBluetooth.checked = true + else + isBluetooth.checked = false + } } Kirigami.Label { text: btEnabled ? qsTr("Bluetooth download:") : qsTr("No Bluetooth support detected")} |