summaryrefslogtreecommitdiffstats
path: root/core/btdiscovery.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2017-07-03 17:25:51 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-07-03 21:58:26 -0700
commitbc864c3bce9a004f60879d33e61f97511ecbed93 (patch)
tree91d33eb086a7a163f34d800b690c9354b287be43 /core/btdiscovery.cpp
parent016b19ef0c1624c5777da52e8c606791c0878828 (diff)
downloadsubsurface-bc864c3bce9a004f60879d33e61f97511ecbed93.tar.gz
Don't add all discovered BT devices
This really doesn't help us as we can't associate a vendor/product with devices we don't recognize, so we can't download from them, anyway. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/btdiscovery.cpp')
-rw-r--r--core/btdiscovery.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/core/btdiscovery.cpp b/core/btdiscovery.cpp
index a5317e58a..6b0cf266d 100644
--- a/core/btdiscovery.cpp
+++ b/core/btdiscovery.cpp
@@ -163,17 +163,11 @@ void BTDiscovery::btDeviceDiscoveredMain(const btPairedDevice &device)
btVP.productIdx = productList[vendor].indexOf(newDevice);
qDebug() << "adding new btDCs entry (detected DC)" << newDevice << btVP.vendorIdx << btVP.productIdx << btVP.btpdi.address;;
btDCs << btVP;
- break;
+ productList[QObject::tr("Paired Bluetooth Devices")].append(device.name + " (" + device.address + ")");
+ return;
}
}
- productList[QObject::tr("Paired Bluetooth Devices")].append(device.name + " (" + device.address + ")");
-
- btVP.btpdi = device;
- btVP.dcDescriptor = newDC;
- btVP.vendorIdx = vendorList.indexOf(QObject::tr("Paired Bluetooth Devices"));
- btVP.productIdx = productList[QObject::tr("Paired Bluetooth Devices")].indexOf(device.name);
- qDebug() << "adding new btDCs entry (all paired)" << newDevice << btVP.vendorIdx << btVP.productIdx << btVP.btpdi.address;
- btAllDevices << btVP;
+ qDebug() << "Not recognized as dive computer";
}
QList<BTDiscovery::btVendorProduct> BTDiscovery::getBtDcs()