diff options
-rw-r--r-- | src/bluetooth/darwin/btcentralmanager.mm | 21 | ||||
-rw-r--r-- | src/bluetooth/darwin/btledeviceinquiry.mm | 8 |
2 files changed, 1 insertions, 28 deletions
diff --git a/src/bluetooth/darwin/btcentralmanager.mm b/src/bluetooth/darwin/btcentralmanager.mm index dd3cbb73..894243dc 100644 --- a/src/bluetooth/darwin/btcentralmanager.mm +++ b/src/bluetooth/darwin/btcentralmanager.mm @@ -1229,13 +1229,7 @@ QT_USE_NAMESPACE #pragma clang diagnostic ignored "-Wunguarded-availability-new" const auto state = central.state; -#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_10_0) || QT_OSX_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_13) - if (state == CBManagerStateUnknown - || state == CBManagerStateResetting) { -#else - if (state == CBCentralManagerStateUnknown - || state == CBCentralManagerStateResetting) { -#endif + if (state == CBManagerStateUnknown || state == CBManagerStateResetting) { // We still have to wait, docs say: // "The current state of the central manager is unknown; // an update is imminent." or @@ -1245,11 +1239,7 @@ QT_USE_NAMESPACE } // Let's check some states we do not like first: -#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_10_0) || QT_OSX_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_13) if (state == CBManagerStateUnsupported || state == CBManagerStateUnauthorized) { -#else - if (state == CBCentralManagerStateUnsupported || state == CBCentralManagerStateUnauthorized) { -#endif if (managerState == CentralManagerUpdating) { // We tried to connect just to realize, LE is not supported. Report this. managerState = CentralManagerIdle; @@ -1266,12 +1256,7 @@ QT_USE_NAMESPACE return; } -#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_10_0) || QT_OSX_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_13) if (state == CBManagerStatePoweredOff) { -#else - if (state == CBCentralManagerStatePoweredOff) { -#endif - if (managerState == CentralManagerUpdating) { managerState = CentralManagerIdle; // I've seen this instead of Unsupported on OS X. @@ -1288,11 +1273,7 @@ QT_USE_NAMESPACE return; } -#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_10_0) || QT_OSX_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_13) if (state == CBManagerStatePoweredOn) { -#else - if (state == CBCentralManagerStatePoweredOn) { -#endif if (managerState == CentralManagerUpdating && !disconnectPending) { managerState = CentralManagerIdle; [self retrievePeripheralAndConnect]; diff --git a/src/bluetooth/darwin/btledeviceinquiry.mm b/src/bluetooth/darwin/btledeviceinquiry.mm index b3f29035..0f9f02b8 100644 --- a/src/bluetooth/darwin/btledeviceinquiry.mm +++ b/src/bluetooth/darwin/btledeviceinquiry.mm @@ -220,11 +220,7 @@ QT_USE_NAMESPACE [manager scanForPeripheralsWithServices:nil options:nil]; } // Else we ignore. -#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_10_0) || QT_OSX_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_13) } else if (state == CBManagerStateUnsupported || state == CBManagerStateUnauthorized) { -#else - } else if (state == CBCentralManagerStateUnsupported || state == CBCentralManagerStateUnauthorized) { -#endif if (internalState == InquiryActive) { [self stopScanSafe]; // Not sure how this is possible at all, @@ -237,11 +233,7 @@ QT_USE_NAMESPACE } [manager setDelegate:nil]; -#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_10_0) || QT_OSX_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_13) } else if (state == CBManagerStatePoweredOff) { -#else - } else if (state == CBCentralManagerStatePoweredOff) { -#endif #ifndef Q_OS_MACOS if (internalState == InquiryStarting) { |