From bc864c3bce9a004f60879d33e61f97511ecbed93 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 3 Jul 2017 17:25:51 -0700 Subject: [PATCH] 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 --- core/btdiscovery.cpp | 12 +++--------- 1 file 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::getBtDcs()