summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@qt.io>2017-11-01 16:16:42 +0100
committerTimur Pocheptsov <timur.pocheptsov@qt.io>2017-11-02 10:40:53 +0000
commit4537a4b45f6344863271d9d780349491ac3449bf (patch)
treeebf788be4bc61b92ce7f0061b01c44e2ee8b4a9d
parent0d2f435672288d1084bfb6156503b6a5afe54827 (diff)
CoreBluetooth - fix compilation errors
Apple keeps breaking things, we keep fixing their usless diagnostic, until they fix their framework for good. https://openradar.appspot.com/33375728 https://openradar.appspot.com/33375690 etc. Change-Id: I0051b4636c6082ac4d0a7d76fc8aebb952394626 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
-rw-r--r--src/bluetooth/osx/osxbtcentralmanager.mm5
-rw-r--r--src/bluetooth/osx/osxbtledeviceinquiry.mm5
-rw-r--r--src/bluetooth/osx/osxbtperipheralmanager.mm5
3 files changed, 15 insertions, 0 deletions
diff --git a/src/bluetooth/osx/osxbtcentralmanager.mm b/src/bluetooth/osx/osxbtcentralmanager.mm
index 70473f1f..78e6b832 100644
--- a/src/bluetooth/osx/osxbtcentralmanager.mm
+++ b/src/bluetooth/osx/osxbtcentralmanager.mm
@@ -1030,6 +1030,9 @@ QT_END_NAMESPACE
{
using namespace OSXBluetooth;
+#pragma clang diagnostic push
+#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
@@ -1099,6 +1102,8 @@ QT_END_NAMESPACE
// We actually handled all known states, but .. Core Bluetooth can change?
Q_ASSERT_X(0, Q_FUNC_INFO, "invalid centra's state");
}
+
+#pragma clang diagnostic pop
}
- (void)centralManager:(CBCentralManager *)central didConnectPeripheral:(CBPeripheral *)aPeripheral
diff --git a/src/bluetooth/osx/osxbtledeviceinquiry.mm b/src/bluetooth/osx/osxbtledeviceinquiry.mm
index 7a516dd4..60222370 100644
--- a/src/bluetooth/osx/osxbtledeviceinquiry.mm
+++ b/src/bluetooth/osx/osxbtledeviceinquiry.mm
@@ -220,6 +220,9 @@ QT_USE_NAMESPACE
- (void)centralManagerDidUpdateState:(CBCentralManager *)central
{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunguarded-availability-new"
+
if (central != manager)
return;
@@ -318,6 +321,8 @@ QT_USE_NAMESPACE
// lost; an update is imminent. "
// Wait for this imminent update.
}
+
+#pragma clang diagnostic pop
}
- (void)stop
diff --git a/src/bluetooth/osx/osxbtperipheralmanager.mm b/src/bluetooth/osx/osxbtperipheralmanager.mm
index 64c8cd90..d3d92f41 100644
--- a/src/bluetooth/osx/osxbtperipheralmanager.mm
+++ b/src/bluetooth/osx/osxbtperipheralmanager.mm
@@ -388,6 +388,9 @@ bool qt_validate_value_range(const QLowEnergyCharacteristicData &data)
- (void)peripheralManagerDidUpdateState:(CBPeripheralManager *)peripheral
{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunguarded-availability-new"
+
if (peripheral != manager || !notifier)
return;
@@ -436,6 +439,8 @@ bool qt_validate_value_range(const QLowEnergyCharacteristicData &data)
emit notifier->LEnotSupported();
state = PeripheralState::idle;
}
+
+#pragma clang diagnostic pop
}
- (void)peripheralManager:(CBPeripheralManager *)peripheral