mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Mobile: wrap up fixes for BT download on Android
Major functional change in this commit is the addition of found static BT devices to the internal administration (on Android), in a way that is equivalent to mobile-on-desktop. So, in both cases, the list of devices in the app are as in the list of devices on the host OS (Linux or Android). To minimize code duplication, the btDeviceDiscovered slot is split in two parts, the part to act as slot for the Qt BT discovery agent (Linux, so mobile-on-desktop), and the part only needed for Android. Remaining to be fixed: the correct handling of the QML UI selection of vendor/product. The first default dive computer is correctly detected, all paired devices from the virtual vendow can be selected, but clicking through vendors results in non logical selections. It is obvious why this is, but a fix is not straigforward at this point. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
5142d7409f
commit
23df593817
4 changed files with 62 additions and 39 deletions
|
@ -53,13 +53,14 @@ Kirigami.Page {
|
|||
GridLayout {
|
||||
columns: 2
|
||||
Kirigami.Label { text: qsTr(" Vendor name: ") }
|
||||
property var vendoridx: downloadThread.data().getDetectedVendorIndex("")
|
||||
ComboBox {
|
||||
id: comboVendor
|
||||
Layout.fillWidth: true
|
||||
model: vendorList
|
||||
currentIndex: downloadThread.data().getDetectedVendorIndex(currentText)
|
||||
currentIndex: parent.vendoridx
|
||||
onCurrentTextChanged: {
|
||||
comboProduct.model = downloadThread.data().getProductListFromVendor(comboVendor.currentText)
|
||||
comboProduct.model = downloadThread.data().getProductListFromVendor(currentText)
|
||||
if (currentIndex == downloadThread.data().getDetectedVendorIndex(currentText))
|
||||
comboProduct.currentIndex = downloadThread.data().getDetectedProductIndex(currentText, comboProduct.currentText)
|
||||
}
|
||||
|
@ -67,9 +68,13 @@ Kirigami.Page {
|
|||
Kirigami.Label { text: qsTr(" Dive Computer:") }
|
||||
ComboBox {
|
||||
id: comboProduct
|
||||
property var productidx: downloadThread.data().getDetectedProductIndex(comboVendor.currentText, currentText)
|
||||
Layout.fillWidth: true
|
||||
model: null
|
||||
currentIndex: -1
|
||||
currentIndex: productidx
|
||||
onModelChanged: {
|
||||
currentIndex = productidx
|
||||
}
|
||||
}
|
||||
Kirigami.Label { text: qsTr("Bluetooth download:") }
|
||||
CheckBox {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue