From a5416b9bead1cfc886531728c2e7602ca75b75c6 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 25 Sep 2018 19:36:34 -0700 Subject: Bluetooth: remember all data during a scan on macOS Since we trigger a scan even without the dialog to pick the right device, we need to remember all devices that we find. Signed-off-by: Dirk Hohndel --- core/btdiscovery.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/core/btdiscovery.cpp b/core/btdiscovery.cpp index 77a3dd3a5..a13cc7078 100644 --- a/core/btdiscovery.cpp +++ b/core/btdiscovery.cpp @@ -177,12 +177,11 @@ void BTDiscovery::btDeviceDiscovered(const QBluetoothDeviceInfo &device) qDebug() << id.toByteArray(); } -#if defined(Q_OS_IOS) || defined(Q_OS_WIN) - // On Desktop this is called when "Save" button is clicked. All - // DeviceInfo are stored as data on the ui list items. - // On mobile (iOS) the current ConnectionListModel does not support - // additional data, so just save all discovered devices. - +#if defined(Q_OS_IOS) || defined(Q_OS_MACOS) || defined(Q_OS_WIN) + // on Windows, macOS and iOS we need to scan in order to be able to access a device; + // let's remember the information we scanned on this run so we can at least + // refer back to it and don't need to open the separate scanning dialog every + // time we try to download from a BT/BLE dive computer. saveBtDeviceInfo(btDeviceAddress(&device, false), device); #endif -- cgit v1.2.3-70-g09d2