summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/osx
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@qt.io>2017-07-11 14:49:41 +0200
committerTimur Pocheptsov <timur.pocheptsov@qt.io>2017-07-11 21:20:11 +0000
commit0c3cc5374d2703fde6a99d301fcff974122d057d (patch)
tree7a6e76eca72b7d1b6a3a93a982c0e9388936dd48 /src/bluetooth/osx
parentd901c65f6a3629c470a05be81d5810a59b7bdd69 (diff)
BTLE (CoreBluetooth) - prospective fix
The type of manage.state has changed on macOS (like on iOS before), making an declataion invalid. Change-Id: I55caa32fa9f0a85090506cfbd788c1a80d41e8ce Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Diffstat (limited to 'src/bluetooth/osx')
-rw-r--r--src/bluetooth/osx/osxbtcentralmanager.mm7
-rw-r--r--src/bluetooth/osx/osxbtledeviceinquiry.mm3
2 files changed, 2 insertions, 8 deletions
diff --git a/src/bluetooth/osx/osxbtcentralmanager.mm b/src/bluetooth/osx/osxbtcentralmanager.mm
index c8eee733..15354f80 100644
--- a/src/bluetooth/osx/osxbtcentralmanager.mm
+++ b/src/bluetooth/osx/osxbtcentralmanager.mm
@@ -1030,12 +1030,7 @@ QT_END_NAMESPACE
{
using namespace OSXBluetooth;
-#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_10_0)
- const CBManagerState state = central.state;
-#else
- const CBCentralManagerState state = central.state;
-#endif
-
+ const auto state = central.state;
#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_10_0)
if (state == CBManagerStateUnknown
|| state == CBManagerStateResetting) {
diff --git a/src/bluetooth/osx/osxbtledeviceinquiry.mm b/src/bluetooth/osx/osxbtledeviceinquiry.mm
index 3ce66d49..05b20167 100644
--- a/src/bluetooth/osx/osxbtledeviceinquiry.mm
+++ b/src/bluetooth/osx/osxbtledeviceinquiry.mm
@@ -233,11 +233,10 @@ QT_USE_NAMESPACE
dispatch_queue_t leQueue(qt_LE_queue());
Q_ASSERT(leQueue);
+ const auto state = central.state;
#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) {