Fix bluetoothEnabled state on iOS
This commit is contained in:
parent
1b8d310a2c
commit
6f759da810
@ -153,10 +153,16 @@ void BluetoothDiscovery::onBluetoothHostModeChanged(const QBluetoothLocalDevice:
|
|||||||
m_discoveryAgent = nullptr;
|
m_discoveryAgent = nullptr;
|
||||||
}
|
}
|
||||||
m_deviceInfos->clearModel();
|
m_deviceInfos->clearModel();
|
||||||
|
#ifdef Q_OS_IOS
|
||||||
|
m_bluetoothEnabled = false;
|
||||||
|
#endif
|
||||||
emit bluetoothEnabledChanged(false);
|
emit bluetoothEnabledChanged(false);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
// Note: discovery works in all other modes
|
// Note: discovery works in all other modes
|
||||||
|
#ifdef Q_OS_IOS
|
||||||
|
m_bluetoothEnabled = true;
|
||||||
|
#endif
|
||||||
emit bluetoothEnabledChanged(hostMode != QBluetoothLocalDevice::HostPoweredOff);
|
emit bluetoothEnabledChanged(hostMode != QBluetoothLocalDevice::HostPoweredOff);
|
||||||
if (!m_discoveryAgent) {
|
if (!m_discoveryAgent) {
|
||||||
#ifdef Q_OS_ANDROID
|
#ifdef Q_OS_ANDROID
|
||||||
|
|||||||
Reference in New Issue
Block a user