summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-07-09 03:05:34 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2019-07-11 14:39:07 +0200
commitba19fd348374688057da4cac9a767eed863a5468 (patch)
treeaefe3ab524e7b32bb47c58576c614eef7a9cd4a8
parent76260fce994e9bac50c62b1c777e56d80848c0df (diff)
parent0fc7e18bf7a24c9408602242d51a852905dfd0da (diff)
Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts: .qmake.conf Change-Id: I48ae70ffcb475ced4a05619310f496527cdd4166
-rw-r--r--src/bluetooth/osx/osxbtperipheralmanager.mm4
-rw-r--r--src/bluetooth/qbluetoothdevicediscoveryagent_ios.mm6
-rw-r--r--src/bluetooth/qlowenergycontroller_osx.mm6
3 files changed, 8 insertions, 8 deletions
diff --git a/src/bluetooth/osx/osxbtperipheralmanager.mm b/src/bluetooth/osx/osxbtperipheralmanager.mm
index 1998340a..39f9808c 100644
--- a/src/bluetooth/osx/osxbtperipheralmanager.mm
+++ b/src/bluetooth/osx/osxbtperipheralmanager.mm
@@ -340,7 +340,7 @@ bool qt_validate_value_range(const QLowEnergyCharacteristicData &data)
- (void)startAdvertising
{
state = PeripheralState::waitingForPowerOn;
- if (manager)
+ if (manager.data())
[manager setDelegate:nil];
manager.reset([[CBPeripheralManager alloc] initWithDelegate:self
queue:OSXBluetooth::qt_LE_queue()]);
@@ -405,7 +405,7 @@ bool qt_validate_value_range(const QLowEnergyCharacteristicData &data)
- (void) addServicesToPeripheral
{
- Q_ASSERT(manager);
+ Q_ASSERT(manager.data());
if (nextServiceToAdd < services.size())
[manager addService:services[nextServiceToAdd++]];
diff --git a/src/bluetooth/qbluetoothdevicediscoveryagent_ios.mm b/src/bluetooth/qbluetoothdevicediscoveryagent_ios.mm
index 059f244d..71ebc88e 100644
--- a/src/bluetooth/qbluetoothdevicediscoveryagent_ios.mm
+++ b/src/bluetooth/qbluetoothdevicediscoveryagent_ios.mm
@@ -132,7 +132,7 @@ QBluetoothDeviceDiscoveryAgentPrivate::QBluetoothDeviceDiscoveryAgentPrivate(con
QBluetoothDeviceDiscoveryAgentPrivate::~QBluetoothDeviceDiscoveryAgentPrivate()
{
- if (inquiryLE) {
+ if (inquiryLE.data()) {
// 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 ...
@@ -151,7 +151,7 @@ bool QBluetoothDeviceDiscoveryAgentPrivate::isActive() const
if (stopPending)
return false;
- return inquiryLE;
+ return !!inquiryLE.data();
}
void QBluetoothDeviceDiscoveryAgentPrivate::start(QBluetoothDeviceDiscoveryAgent::DiscoveryMethods /*methods*/)
@@ -178,7 +178,7 @@ void QBluetoothDeviceDiscoveryAgentPrivate::start(QBluetoothDeviceDiscoveryAgent
this, &QBluetoothDeviceDiscoveryAgentPrivate::LEdeviceFound);
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());
diff --git a/src/bluetooth/qlowenergycontroller_osx.mm b/src/bluetooth/qlowenergycontroller_osx.mm
index 8bcdc22e..9aaee855 100644
--- a/src/bluetooth/qlowenergycontroller_osx.mm
+++ b/src/bluetooth/qlowenergycontroller_osx.mm
@@ -165,7 +165,7 @@ QLowEnergyControllerPrivateOSX::QLowEnergyControllerPrivateOSX(QLowEnergyControl
#endif
} else {
centralManager.reset([[ObjCCentralManager alloc] initWith:notifier.data()]);
- if (!centralManager) {
+ if (!centralManager.data()) {
qCWarning(QT_BT_OSX) << "failed to initialize central manager";
return;
}
@@ -200,9 +200,9 @@ QLowEnergyControllerPrivateOSX::~QLowEnergyControllerPrivateOSX()
bool QLowEnergyControllerPrivateOSX::isValid() const
{
#ifdef Q_OS_TVOS
- return centralManager;
+ return centralManager.data();
#else
- return centralManager || peripheralManager;
+ return centralManager.data() || peripheralManager.data();
#endif
}