From 6f759da810b47fd7996b036effeef4aa50c6ef40 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Tue, 7 Dec 2021 14:06:12 +0100 Subject: [PATCH] Fix bluetoothEnabled state on iOS --- libnymea-app/wifisetup/bluetoothdiscovery.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libnymea-app/wifisetup/bluetoothdiscovery.cpp b/libnymea-app/wifisetup/bluetoothdiscovery.cpp index 1594ee19..ca888eff 100644 --- a/libnymea-app/wifisetup/bluetoothdiscovery.cpp +++ b/libnymea-app/wifisetup/bluetoothdiscovery.cpp @@ -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