diff options
author | Jan Mulder <jlmulder@xs4all.nl> | 2017-06-08 14:15:22 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-06-12 09:49:11 -0700 |
commit | f6e94e691f49c1df6c161bfd2961fa28edbf84d3 (patch) | |
tree | 8a72f6589af5bca2147e67e4cf83906634b5c6ee | |
parent | a7288cc912267415196cfa956b7813752748c35c (diff) | |
download | subsurface-f6e94e691f49c1df6c161bfd2961fa28edbf84d3.tar.gz |
QML UI: call correct function for BT address
After the recent refactoring of QMLManager to btdiscovery, the
manager.getBtAddress() got superseeded by
downloadThread.data().getDetectedDeviceAddress(). Corrected this
here.
Futher some debug output is modified, so that it report the proper
function names.
This corrects the download from an automatically detected OSTC 3.
Manul selection of the same device from the fake vendor "Paired
BT Devices" does not work, however. Still work to be done in
that area.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | core/downloadfromdcthread.cpp | 6 | ||||
-rw-r--r-- | mobile-widgets/qml/DownloadFromDiveComputer.qml | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/core/downloadfromdcthread.cpp b/core/downloadfromdcthread.cpp index 9583eff15..43bd1e0b8 100644 --- a/core/downloadfromdcthread.cpp +++ b/core/downloadfromdcthread.cpp @@ -247,7 +247,7 @@ int DCDeviceData::getDetectedVendorIndex() #if defined(BT_SUPPORT) QList<btVendorProduct> btDCs = BTDiscovery::instance()->getBtDcs(); if (!btDCs.isEmpty()) { - qDebug() << "getVendorIdx" << btDCs.first().vendorIdx; + qDebug() << "getDetectedVendorIndex" << btDCs.first().vendorIdx; return btDCs.first().vendorIdx; } #endif @@ -259,7 +259,7 @@ int DCDeviceData::getDetectedProductIndex() #if defined(BT_SUPPORT) QList<btVendorProduct> btDCs = BTDiscovery::instance()->getBtDcs(); if (!btDCs.isEmpty()) { - qDebug() << "getProductIdx" << btDCs.first().productIdx; + qDebug() << "getDetectedProductIndex" << btDCs.first().productIdx; return btDCs.first().productIdx; } #endif @@ -272,7 +272,7 @@ QString DCDeviceData::getDetectedDeviceAddress() QList<btVendorProduct> btDCs = BTDiscovery::instance()->getBtDcs(); if (!btDCs.isEmpty()) { QString btAddr = btDCs.first().btdi.address().toString(); - qDebug() << "getBtAddress" << btAddr; + qDebug() << "getDetectedDeviceAddress" << btAddr; return btAddr; } return QString(); diff --git a/mobile-widgets/qml/DownloadFromDiveComputer.qml b/mobile-widgets/qml/DownloadFromDiveComputer.qml index 8b9f642ff..6a24f2dc9 100644 --- a/mobile-widgets/qml/DownloadFromDiveComputer.qml +++ b/mobile-widgets/qml/DownloadFromDiveComputer.qml @@ -89,11 +89,11 @@ Kirigami.Page { onClicked: { text: qsTr("Retry") if (downloadThread.deviceData.bluetoothMode) { - var addr = manager.getBtAddress() + var addr = downloadThread.data().getDetectedDeviceAddress() if (addr !== "") downloadThread.deviceData.devName = addr } - manager.appendTextToLog("DCDownloadThread started from " + downloadThread.deviceData.devName) + manager.appendTextToLog("DCDownloadThread started for " + downloadThread.deviceData.devName) downloadThread.start() } } |