mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
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>
This commit is contained in:
parent
a7288cc912
commit
f6e94e691f
2 changed files with 5 additions and 5 deletions
|
@ -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();
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue