summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/downloadfromdcthread.cpp8
-rw-r--r--core/downloadfromdcthread.h8
-rw-r--r--mobile-widgets/qml/DownloadFromDiveComputer.qml8
3 files changed, 10 insertions, 14 deletions
diff --git a/core/downloadfromdcthread.cpp b/core/downloadfromdcthread.cpp
index 43861f035..109de69b2 100644
--- a/core/downloadfromdcthread.cpp
+++ b/core/downloadfromdcthread.cpp
@@ -330,7 +330,7 @@ device_data_t* DCDeviceData::internalData()
return &data;
}
-int DCDeviceData::getDetectedVendorIndex(const QString &currentText)
+int DCDeviceData::getDetectedVendorIndex()
{
auto dcs = SettingsObjectWrapper::instance()->dive_computer_settings;
if (!dcs->dc_vendor().isEmpty()) {
@@ -351,8 +351,7 @@ int DCDeviceData::getDetectedVendorIndex(const QString &currentText)
return -1;
}
-int DCDeviceData::getDetectedProductIndex(const QString &currentVendorText,
- const QString &currentProductText)
+int DCDeviceData::getDetectedProductIndex(const QString &currentVendorText)
{
auto dcs = SettingsObjectWrapper::instance()->dive_computer_settings;
if (!dcs->dc_vendor().isEmpty()) {
@@ -377,8 +376,7 @@ int DCDeviceData::getDetectedProductIndex(const QString &currentVendorText,
return -1;
}
-QString DCDeviceData::getDetectedDeviceAddress(const QString &currentVendorText,
- const QString &currentProductText)
+QString DCDeviceData::getDetectedDeviceAddress(const QString &currentProductText)
{
#if defined(BT_SUPPORT)
// Pull the vendor from the found devices that are possible real dive computers
diff --git a/core/downloadfromdcthread.h b/core/downloadfromdcthread.h
index 0760363d5..946574125 100644
--- a/core/downloadfromdcthread.h
+++ b/core/downloadfromdcthread.h
@@ -47,11 +47,9 @@ public:
Q_INVOKABLE QStringList getProductListFromVendor(const QString& vendor);
Q_INVOKABLE int getMatchingAddress(const QString &vendor, const QString &product);
- Q_INVOKABLE int getDetectedVendorIndex(const QString &currentText);
- Q_INVOKABLE int getDetectedProductIndex(const QString &currentVendorText,
- const QString &currentProductText);
- Q_INVOKABLE QString getDetectedDeviceAddress(const QString &currentVendorText,
- const QString &currentProductText);
+ Q_INVOKABLE int getDetectedVendorIndex();
+ Q_INVOKABLE int getDetectedProductIndex(const QString &currentVendorText);
+ Q_INVOKABLE QString getDetectedDeviceAddress(const QString &currentProductText);
public slots:
void setVendor(const QString& vendor);
diff --git a/mobile-widgets/qml/DownloadFromDiveComputer.qml b/mobile-widgets/qml/DownloadFromDiveComputer.qml
index a1567494f..9ff0494c0 100644
--- a/mobile-widgets/qml/DownloadFromDiveComputer.qml
+++ b/mobile-widgets/qml/DownloadFromDiveComputer.qml
@@ -61,7 +61,7 @@ Kirigami.Page {
GridLayout {
columns: 2
Kirigami.Label { text: qsTr(" Vendor name: ") }
- property var vendoridx: downloadThread.data().getDetectedVendorIndex("")
+ property var vendoridx: downloadThread.data().getDetectedVendorIndex()
ComboBox {
id: comboVendor
Layout.fillWidth: true
@@ -87,14 +87,14 @@ Kirigami.Page {
}
onCurrentTextChanged: {
comboProduct.model = downloadThread.data().getProductListFromVendor(currentText)
- if (currentIndex == downloadThread.data().getDetectedVendorIndex(currentText))
- comboProduct.currentIndex = downloadThread.data().getDetectedProductIndex(currentText, comboProduct.currentText)
+ if (currentIndex == downloadThread.data().getDetectedVendorIndex())
+ comboProduct.currentIndex = downloadThread.data().getDetectedProductIndex(currentText)
}
}
Kirigami.Label { text: qsTr(" Dive Computer:") }
ComboBox {
id: comboProduct
- property var productidx: downloadThread.data().getDetectedProductIndex(comboVendor.currentText, currentText)
+ property var productidx: downloadThread.data().getDetectedProductIndex(comboVendor.currentText)
Layout.fillWidth: true
model: null
currentIndex: productidx