diff options
author | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2016-11-04 12:14:15 +0100 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2016-11-04 12:22:27 +0000 |
commit | e5144d6a551f566c3d2ba5794e9a83b6a2013b08 (patch) | |
tree | 0115e59f0dea62a3ec8d4ccb3bb49a40f0e8cf68 /src | |
parent | 78402e8f96a49462677cd07ae57c7d830228ec3b (diff) |
CoreBluetooth - fix compilation warnings
With the latest SDK on iOS we have to use CBManagerStateXXX, not
CBPeripheralManagerStateXXX/CBCentralManagerStateXXX.
Change-Id: I5be7f55c9ee64afe6a6260573fe9e939ac7440fb
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/bluetooth/osx/osxbtperipheralmanager.mm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/bluetooth/osx/osxbtperipheralmanager.mm b/src/bluetooth/osx/osxbtperipheralmanager.mm index 0c492aad..7a27b66b 100644 --- a/src/bluetooth/osx/osxbtperipheralmanager.mm +++ b/src/bluetooth/osx/osxbtperipheralmanager.mm @@ -362,7 +362,11 @@ quint32 qt_countGATTEntries(const QLowEnergyServiceData &data) if (peripheral != manager || !notifier) return; +#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_10_0) + if (peripheral.state == CBManagerStatePoweredOn) { +#else if (peripheral.state == CBPeripheralManagerStatePoweredOn) { +#endif // "Bluetooth is currently powered on and is available to use." if (state == PeripheralState::waitingForPowerOn) { [manager removeAllServices]; @@ -393,8 +397,13 @@ quint32 qt_countGATTEntries(const QLowEnergyServiceData &data) explicitly added again." */ +#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_10_0) + if (peripheral.state == CBManagerStateUnauthorized || + peripheral.state == CBManagerStateUnsupported) { +#else if (peripheral.state == CBPeripheralManagerStateUnauthorized || peripheral.state == CBPeripheralManagerStateUnsupported) { +#endif emit notifier->LEnotSupported(); state = PeripheralState::idle; } |