mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Bluetooth: all states other than HostPoweredOff qualify as valid
This is an attempt to fix issue #1896. While this seems a Qt issue in combination with very specific Android devices, this might be a fix. Do not check for a very specific state of the local BT controller, but just check if it is powered on. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This commit is contained in:
parent
99d29a7838
commit
ffec5f4991
1 changed files with 3 additions and 2 deletions
|
@ -102,10 +102,11 @@ BTDiscovery::BTDiscovery(QObject*) : m_btValid(false),
|
|||
void BTDiscovery::BTDiscoveryReDiscover()
|
||||
{
|
||||
#if !defined(Q_OS_IOS)
|
||||
qDebug() << "BTDiscoveryReDiscover: localBtDevice.isValid()" << localBtDevice.isValid();
|
||||
if (localBtDevice.isValid() &&
|
||||
localBtDevice.hostMode() == QBluetoothLocalDevice::HostConnectable) {
|
||||
localBtDevice.hostMode() != QBluetoothLocalDevice::HostPoweredOff) {
|
||||
btPairedDevices.clear();
|
||||
qDebug() << "localDevice " + localBtDevice.name() + " is valid, starting discovery";
|
||||
qDebug() << "BTDiscoveryReDiscover: localDevice " + localBtDevice.name() + " is powered on, starting discovery";
|
||||
#else
|
||||
// for iOS we can't use the localBtDevice as iOS is BLE only
|
||||
// we need to find some other way to test if Bluetooth is enabled, though
|
||||
|
|
Loading…
Reference in a new issue