mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
14f47c627d
commit
c5b1fd9f53
1 changed files with 6 additions and 3 deletions
|
@ -235,9 +235,12 @@ void BtDeviceSelectionDialog::currentItemChanged(QListWidgetItem *item, QListWid
|
||||||
bool enableSaveButton = true;
|
bool enableSaveButton = true;
|
||||||
|
|
||||||
#if !defined(Q_OS_WIN)
|
#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
|
// On platforms other than Windows we can obtain the pairing status so if the devices are non-BLE devices
|
||||||
// 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)
|
// and not paired we disable the button
|
||||||
if (!remoteDeviceInfo.address().isNull()) {
|
// 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());
|
QBluetoothLocalDevice::Pairing pairingStatus = localDevice->pairingStatus(remoteDeviceInfo.address());
|
||||||
|
|
||||||
if (pairingStatus == QBluetoothLocalDevice::Unpaired) {
|
if (pairingStatus == QBluetoothLocalDevice::Unpaired) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue