summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@qt.io>2017-09-05 13:28:53 +0200
committerTimur Pocheptsov <timur.pocheptsov@qt.io>2017-09-06 04:31:32 +0000
commitae21b2574c0000aac6e3b10f7e11ebd1da567ffd (patch)
tree00360f05f96cc38fcdd45ec1e23554deb263f61a
parent19e6a952d9b736ae9e052d094f908946b4abebe3 (diff)
CoreBluetooth - use the right enumerators/constants with SDK 10.13
Like it was done for central manager - use the correct enumerators (types) - with 10.13 SDK they also use 'generic' CBManagerXXX constants on macOS instead of CBCentral/PeripheralManagerXXX constants. Task-number: QTBUG-62658 Change-Id: I4b4de239930f5e731dc4977ff3353512290ff3b2 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
-rw-r--r--src/bluetooth/osx/osxbtperipheralmanager.mm4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bluetooth/osx/osxbtperipheralmanager.mm b/src/bluetooth/osx/osxbtperipheralmanager.mm
index 9c443cf6..64c8cd90 100644
--- a/src/bluetooth/osx/osxbtperipheralmanager.mm
+++ b/src/bluetooth/osx/osxbtperipheralmanager.mm
@@ -391,7 +391,7 @@ bool qt_validate_value_range(const QLowEnergyCharacteristicData &data)
if (peripheral != manager || !notifier)
return;
-#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_10_0)
+#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_10_0) || QT_OSX_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_13)
if (peripheral.state == CBManagerStatePoweredOn) {
#else
if (peripheral.state == CBPeripheralManagerStatePoweredOn) {
@@ -426,7 +426,7 @@ bool qt_validate_value_range(const QLowEnergyCharacteristicData &data)
explicitly added again."
*/
-#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_10_0)
+#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_10_0) || QT_OSX_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_13)
if (peripheral.state == CBManagerStateUnauthorized ||
peripheral.state == CBManagerStateUnsupported) {
#else