diff options
author | Timur Pocheptsov <Timur.Pocheptsov@digia.com> | 2015-03-24 13:12:27 +0100 |
---|---|---|
committer | Timur Pocheptsov <Timur.Pocheptsov@digia.com> | 2015-03-24 14:29:01 +0000 |
commit | 8440ab606048663ae7bef42c5930d5d77f30bf50 (patch) | |
tree | 8aaa085debdbe22d194dc76fce1d3e1efa2cf26e | |
parent | cd37c6bbc6ad4368bf9f4bc5fb3b8462f2b10cab (diff) |
Bluetooth device discovery agent - minor cleanup (OS X)
Use d_ptr; test inquiryLE in 'isValid' also (just to be consistent).
Change-Id: If5a8977cfc7adfb06150a2bf8a2e14d0613e26c7
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
-rw-r--r-- | src/bluetooth/osx/osxbtledeviceinquiry.mm | 1 | ||||
-rw-r--r-- | src/bluetooth/qbluetoothdevicediscoveryagent_osx.mm | 9 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/bluetooth/osx/osxbtledeviceinquiry.mm b/src/bluetooth/osx/osxbtledeviceinquiry.mm index 1dbe63a6..af304d8d 100644 --- a/src/bluetooth/osx/osxbtledeviceinquiry.mm +++ b/src/bluetooth/osx/osxbtledeviceinquiry.mm @@ -108,7 +108,6 @@ using namespace QT_NAMESPACE; #endif @interface QT_MANGLE_NAMESPACE(OSXBTLEDeviceInquiry) (PrivateAPI) <CBCentralManagerDelegate, CBPeripheralDelegate> -+ (NSTimeInterval)inquiryLength; // "Timeout" callback to stop a scan. - (void)stopScan; @end diff --git a/src/bluetooth/qbluetoothdevicediscoveryagent_osx.mm b/src/bluetooth/qbluetoothdevicediscoveryagent_osx.mm index ecd21239..ebf9352d 100644 --- a/src/bluetooth/qbluetoothdevicediscoveryagent_osx.mm +++ b/src/bluetooth/qbluetoothdevicediscoveryagent_osx.mm @@ -217,7 +217,8 @@ bool QBluetoothDeviceDiscoveryAgentPrivate::isValid() const // can fail to initialize some important data-members // (and the error is probably not even related to Bluetooth at all) // - say, allocation error - this is what meant here by valid/invalid. - return hostController && [hostController powerState] == kBluetoothHCIPowerStateON && inquiry; + return hostController && [hostController powerState] == kBluetoothHCIPowerStateON + && inquiry && inquiryLE; } bool QBluetoothDeviceDiscoveryAgentPrivate::isActive() const @@ -564,14 +565,12 @@ QBluetoothDeviceDiscoveryAgent::~QBluetoothDeviceDiscoveryAgent() QBluetoothDeviceDiscoveryAgent::InquiryType QBluetoothDeviceDiscoveryAgent::inquiryType() const { - Q_D(const QBluetoothDeviceDiscoveryAgent); - return d->inquiryType; + return d_ptr->inquiryType; } void QBluetoothDeviceDiscoveryAgent::setInquiryType(QBluetoothDeviceDiscoveryAgent::InquiryType type) { - Q_D(QBluetoothDeviceDiscoveryAgent); - d->inquiryType = type; + d_ptr->inquiryType = type; } QList<QBluetoothDeviceInfo> QBluetoothDeviceDiscoveryAgent::discoveredDevices() const |