summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/downloadfromdcthread.cpp5
-rw-r--r--mobile-widgets/qml/DownloadFromDiveComputer.qml27
2 files changed, 14 insertions, 18 deletions
diff --git a/core/downloadfromdcthread.cpp b/core/downloadfromdcthread.cpp
index e837b0442..69c41c229 100644
--- a/core/downloadfromdcthread.cpp
+++ b/core/downloadfromdcthread.cpp
@@ -212,6 +212,11 @@ DCDeviceData::DCDeviceData(QObject *parent) : QObject(parent)
data.download_table = nullptr;
data.diveid = 0;
data.deviceid = 0;
+ data.bluetooth_mode = true;
+ data.force_download = false;
+ data.create_new_trip = false;
+ data.libdc_dump = false;
+ data.libdc_log = false;
if (m_instance) {
qDebug() << "already have an instance of DCDevieData";
return;
diff --git a/mobile-widgets/qml/DownloadFromDiveComputer.qml b/mobile-widgets/qml/DownloadFromDiveComputer.qml
index df9faeb4c..35d4c3661 100644
--- a/mobile-widgets/qml/DownloadFromDiveComputer.qml
+++ b/mobile-widgets/qml/DownloadFromDiveComputer.qml
@@ -23,18 +23,6 @@ Kirigami.Page {
DCDownloadThread {
id: downloadThread
- deviceData.vendor : comboVendor.currentText
- deviceData.product : comboProduct.currentText
- deviceData.devName : comboConnection.currentText
-
- //TODO: Make this the default on the C++
- deviceData.bluetoothMode : true
- deviceData.forceDownload : false
- deviceData.createNewTrip : false
- deviceData.deviceId : 0
- deviceData.diveId : 0
- deviceData.saveDump : false
- deviceData.saveLog : true
onFinished : {
importModel.repopulate()
@@ -164,10 +152,10 @@ Kirigami.Page {
btAddr = /\{?[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\}/;
if (btAddr.test(currentText))
- downloadThread.deviceData.bluetoothMode = true
+ downloadThread.manager.DC_bluetoothMode = true
else
- downloadThread.deviceData.bluetoothMode = false
- downloadThread.deviceData.devName = comboConnection.currentText
+ downloadThread.manager.DC_bluetoothMode = false
+ downloadThread.manager.DC_devName = comboConnection.currentText
}
}
}
@@ -198,9 +186,9 @@ Kirigami.Page {
onClicked: {
text = qsTr("Retry")
// strip any BT Name from the address
- var devName = downloadThread.deviceData.devName
- downloadThread.deviceData.devName = devName.replace(/^(.*) /, "")
- manager.appendTextToLog("DCDownloadThread started for " + downloadThread.deviceData.product + " on "+ downloadThread.deviceData.devName)
+ var devName = downloadThread.manager.devName
+ downloadThread.manager.devName = devName.replace(/^(.*) /, "")
+ manager.appendTextToLog("DCDownloadThread started for " + downloadThread.manager.product + " on "+ downloadThread.manager.devName)
progressBar.visible = true
downloadThread.start()
}
@@ -309,6 +297,9 @@ Kirigami.Page {
comboVendor.currentIndex = downloadThread.data().getDetectedVendorIndex()
comboProduct.currentIndex = downloadThread.data().getDetectedProductIndex(comboVendor.currentText)
comboDevice.currentIndex = downloadThread.data().getMatchingAddress(comboVendor.currentText, comboProduct.currentText)
+ manager.DC_vendor = comboVendor.currentText
+ manager.DC_product = comboProduct.currentText
+ manager.DC_devName = comboConnection.currentText
}
}
}