diff options
author | André Klitzing <aklitzing@gmail.com> | 2019-07-19 11:06:59 +0200 |
---|---|---|
committer | André Klitzing <aklitzing@gmail.com> | 2019-07-19 11:27:49 +0200 |
commit | 8110fdd4c6d80d05934768fa808a4cb187212fe0 (patch) | |
tree | eed715b102a46cd406b4949a25abddb6f32d92d8 /src/bluetooth/qbluetoothdevicediscoveryagent_osx.mm | |
parent | 263fc5186325a7dd59a7533b98b3bf1296ea0d16 (diff) |
Core/IO/Bluetooth - fix ambiguous conversions for macOS
This is a sibling of QTBUG-76847 on macOS instead of iOS.
Change-Id: I3df6e28d65b9835f5f54e92d462d23423c48d835
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/bluetooth/qbluetoothdevicediscoveryagent_osx.mm')
-rw-r--r-- | src/bluetooth/qbluetoothdevicediscoveryagent_osx.mm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bluetooth/qbluetoothdevicediscoveryagent_osx.mm b/src/bluetooth/qbluetoothdevicediscoveryagent_osx.mm index 4657da82..bdc3c85e 100644 --- a/src/bluetooth/qbluetoothdevicediscoveryagent_osx.mm +++ b/src/bluetooth/qbluetoothdevicediscoveryagent_osx.mm @@ -181,7 +181,7 @@ QBluetoothDeviceDiscoveryAgentPrivate::QBluetoothDeviceDiscoveryAgentPrivate(con QBluetoothDeviceDiscoveryAgentPrivate::~QBluetoothDeviceDiscoveryAgentPrivate() { - if (inquiryLE && agentState != NonActive) { + if (inquiryLE.data() && agentState != NonActive) { // We want the LE scan to stop as soon as possible. if (dispatch_queue_t leQueue = OSXBluetooth::qt_LE_queue()) { // Local variable to be retained ... @@ -195,7 +195,7 @@ QBluetoothDeviceDiscoveryAgentPrivate::~QBluetoothDeviceDiscoveryAgentPrivate() bool QBluetoothDeviceDiscoveryAgentPrivate::isValid() const { - return hostController && [hostController powerState] == kBluetoothHCIPowerStateON; + return hostController.data() && [hostController powerState] == kBluetoothHCIPowerStateON; } bool QBluetoothDeviceDiscoveryAgentPrivate::isActive() const @@ -292,7 +292,7 @@ void QBluetoothDeviceDiscoveryAgentPrivate::startLE() // Check queue and create scanner: inquiryLE.reset([[LEDeviceInquiryObjC alloc] initWithNotifier:notifier.data()]); - if (inquiryLE) + if (inquiryLE.data()) notifier.take(); // Whatever happens next, inquiryLE is already the owner ... dispatch_queue_t leQueue(qt_LE_queue()); |