summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/osx/osxbtledeviceinquiry.mm
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@qt.io>2016-10-11 15:36:14 +0200
committerAlex Blasche <alexander.blasche@qt.io>2016-10-12 11:30:14 +0200
commit515ff5b0f9a2245a13cec6f2d37edd1715cdae8c (patch)
tree3a7748f578d772a5a4e9bcd8b09168657146d695 /src/bluetooth/osx/osxbtledeviceinquiry.mm
parentca661f332886760f2154ed7ed14550722c554943 (diff)
parent7b443cd0fdd1940a8bfaad73df5e309a52b7669f (diff)
Merge remote-tracking branch 'gerrit/5.7' into 5.8v5.8.0-beta1
Conflicts: src/bluetooth/osx/osxbtledeviceinquiry.mm src/bluetooth/qbluetoothdevicediscoveryagent_osx.mm Change-Id: I7dc75c187af73917f31c28b9edfaf8bcf9652a3e
Diffstat (limited to 'src/bluetooth/osx/osxbtledeviceinquiry.mm')
-rw-r--r--src/bluetooth/osx/osxbtledeviceinquiry.mm24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/bluetooth/osx/osxbtledeviceinquiry.mm b/src/bluetooth/osx/osxbtledeviceinquiry.mm
index 7f522c14..8b924d82 100644
--- a/src/bluetooth/osx/osxbtledeviceinquiry.mm
+++ b/src/bluetooth/osx/osxbtledeviceinquiry.mm
@@ -46,8 +46,6 @@
#include <QtCore/qloggingcategory.h>
#include <QtCore/qdebug.h>
-#include "corebluetoothwrapper_p.h"
-
#include <algorithm>
QT_BEGIN_NAMESPACE
@@ -196,8 +194,13 @@ QT_USE_NAMESPACE
dispatch_queue_t leQueue(qt_LE_queue());
Q_ASSERT(leQueue);
- const CBCentralManagerState cbState(central.state);
- if (cbState == CBCentralManagerStatePoweredOn) {
+#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_10_0)
+ const CBManagerState state(central.state);
+ if (state == CBManagerStatePoweredOn) {
+#else
+ const CBCentralManagerState state(central.state);
+ if (state == CBCentralManagerStatePoweredOn) {
+#endif
if (internalState == InquiryStarting) {
internalState = InquiryActive;
@@ -218,8 +221,11 @@ QT_USE_NAMESPACE
[manager scanForPeripheralsWithServices:nil options:nil];
} // Else we ignore.
- } else if (cbState == CBCentralManagerStateUnsupported
- || cbState == CBCentralManagerStateUnauthorized) {
+#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_10_0)
+ } else if (state == CBManagerStateUnsupported || state == CBManagerStateUnauthorized) {
+#else
+ } else if (state == CBCentralManagerStateUnsupported || state == CBCentralManagerStateUnauthorized) {
+#endif
if (internalState == InquiryActive) {
[manager stopScan];
// Not sure how this is possible at all,
@@ -232,7 +238,11 @@ QT_USE_NAMESPACE
}
[manager setDelegate:nil];
- } else if (cbState == CBCentralManagerStatePoweredOff) {
+#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_10_0)
+ } else if (state == CBManagerStatePoweredOff) {
+#else
+ } else if (state == CBCentralManagerStatePoweredOff) {
+#endif
if (internalState == InquiryStarting) {
#ifndef Q_OS_OSX
// On iOS a user can see at this point an alert asking to