From c5b1fd9f5336a8bb4ae048f6f31ac3e3651a5ea3 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 22 Aug 2020 13:18:36 -0700 Subject: 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 --- desktop-widgets/btdeviceselectiondialog.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'desktop-widgets') 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) { -- cgit v1.2.3-70-g09d2