diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2020-08-22 13:18:36 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-08-22 19:35:58 -0700 |
commit | c5b1fd9f5336a8bb4ae048f6f31ac3e3651a5ea3 (patch) | |
tree | 974f6a86ec2804346e95c2c189531a7f7020834b /desktop-widgets/btdeviceselectiondialog.cpp | |
parent | 14f47c627d8060c6463ae45dc5148ba8cf87bcea (diff) | |
download | subsurface-c5b1fd9f5336a8bb4ae048f6f31ac3e3651a5ea3.tar.gz |
core/BLE: don't insist on pairing of pure BLE devices
Most (all?) BLE dive computers actually don't need to be paired, and some
apparently can't be paired. So let's not enforce that.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets/btdeviceselectiondialog.cpp')
-rw-r--r-- | desktop-widgets/btdeviceselectiondialog.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/desktop-widgets/btdeviceselectiondialog.cpp b/desktop-widgets/btdeviceselectiondialog.cpp index 01d8bd9de..2df93d072 100644 --- a/desktop-widgets/btdeviceselectiondialog.cpp +++ b/desktop-widgets/btdeviceselectiondialog.cpp @@ -235,9 +235,12 @@ void BtDeviceSelectionDialog::currentItemChanged(QListWidgetItem *item, QListWid bool enableSaveButton = true; #if !defined(Q_OS_WIN) - // On other platforms than Windows we can obtain the pairing status so if the devices are not paired we disable the button - // except on MacOS for those devices that only give us a Uuid and not and address (as we have no pairing status for those, either) - if (!remoteDeviceInfo.address().isNull()) { + // On platforms other than Windows we can obtain the pairing status so if the devices are non-BLE devices + // and not paired we disable the button + // on MacOS some devices (including all BLE devices) only give us a Uuid and not and address; for those + // we have no pairing status, either + if (!remoteDeviceInfo.address().isNull() && + remoteDeviceInfo.coreConfigurations() != QBluetoothDeviceInfo::LowEnergyCoreConfiguration) { QBluetoothLocalDevice::Pairing pairingStatus = localDevice->pairingStatus(remoteDeviceInfo.address()); if (pairingStatus == QBluetoothLocalDevice::Unpaired) { |