Fix bluetoothEnabled state on iOS

pull/718/head
Michael Zanetti 2021-12-07 14:06:12 +01:00
parent 1b8d310a2c
commit 6f759da810
1 changed files with 6 additions and 0 deletions

View File

@ -153,10 +153,16 @@ void BluetoothDiscovery::onBluetoothHostModeChanged(const QBluetoothLocalDevice:
m_discoveryAgent = nullptr;
}
m_deviceInfos->clearModel();
#ifdef Q_OS_IOS
m_bluetoothEnabled = false;
#endif
emit bluetoothEnabledChanged(false);
break;
default:
// Note: discovery works in all other modes
#ifdef Q_OS_IOS
m_bluetoothEnabled = true;
#endif
emit bluetoothEnabledChanged(hostMode != QBluetoothLocalDevice::HostPoweredOff);
if (!m_discoveryAgent) {
#ifdef Q_OS_ANDROID