summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/osx/osxbtcentralmanager.mm
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@qt.io>2017-07-11 14:49:41 +0200
committerTimur Pocheptsov <timur.pocheptsov@qt.io>2017-07-16 15:18:56 +0000
commit746187ad9ef1f8c9a3d797879bb3771377ae4bca (patch)
treec8c158d27a1b9652d3a444f7fb83794d5420c2d4 /src/bluetooth/osx/osxbtcentralmanager.mm
parentb0089abb05e6f60cc252068be1ba40be32e29bd3 (diff)
BTLE (CoreBluetooth) - prospective fix
The type of manage.state has changed on macOS (like on iOS before), making an declataion invalid. (cherry-picked from qtconnectivity/0c3cc5374d2703fde6a99d301fcff974122d057d) Change-Id: I55caa32fa9f0a85090506cfbd788c1a80d41e8ce Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/bluetooth/osx/osxbtcentralmanager.mm')
-rw-r--r--src/bluetooth/osx/osxbtcentralmanager.mm7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/bluetooth/osx/osxbtcentralmanager.mm b/src/bluetooth/osx/osxbtcentralmanager.mm
index f7218ca6..9e5128c4 100644
--- a/src/bluetooth/osx/osxbtcentralmanager.mm
+++ b/src/bluetooth/osx/osxbtcentralmanager.mm
@@ -1032,12 +1032,7 @@ QT_END_NAMESPACE
{
using namespace OSXBluetooth;
-#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_10_0)
- const CBManagerState state = central.state;
-#else
- const CBCentralManagerState state = central.state;
-#endif
-
+ const auto state = central.state;
#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_10_0)
if (state == CBManagerStateUnknown
|| state == CBManagerStateResetting) {