diff options
author | Timur Pocheptsov <Timur.Pocheptsov@digia.com> | 2014-09-30 17:29:15 +0200 |
---|---|---|
committer | Timur Pocheptsov <Timur.Pocheptsov@digia.com> | 2014-10-16 09:46:15 +0200 |
commit | e417b7036e35744daa1978cd236798e3ee1693c0 (patch) | |
tree | 3e86b6ce833e70efa75f8151302973a030338fb2 /src/bluetooth/osx/osxbtdevicepair.mm | |
parent | 552bdb884b44fffde3075ee2016a8a5c04108b3c (diff) |
QtBluetooth - device discovery test on OS X.
- Enable this auto test on OS X, requires a modification: 'stop' is synchronous
and so cancelSpy.isEmpty() == false (the last QVERIFY fails.
- Fix several problems with SDK versions (workarounds for non-existing methods in SDK < 10.9).
- Change error handling: we set an error in a ctor _only_ if QBluetoothAddress parameter was
not null (!isNull()) and we failed to find a local device with such an address. This is the
only case documented/expected, all others _do_ _not_ set an error, even if a local adapter
is off or does not exits. This fixes a failing (to integrate) auto-test.
Change-Id: I9902211078330f296775f1c3249da166c19001a4
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'src/bluetooth/osx/osxbtdevicepair.mm')
-rw-r--r-- | src/bluetooth/osx/osxbtdevicepair.mm | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/bluetooth/osx/osxbtdevicepair.mm b/src/bluetooth/osx/osxbtdevicepair.mm index 8edc30a6..c9d6de32 100644 --- a/src/bluetooth/osx/osxbtdevicepair.mm +++ b/src/bluetooth/osx/osxbtdevicepair.mm @@ -97,7 +97,13 @@ using namespace QT_NAMESPACE; - (void)dealloc { - [m_pairing stop]; // Stop also sets a delegate to nil (Apple's docs). +#if QT_MAC_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_9, __IPHONE_NA) + // Stop also sets a delegate to nil (Apple's docs). + // 10.9 only. + [m_pairing stop]; +#else + [m_pairing setDelegate:nil]; +#endif [m_pairing release]; [super dealloc]; @@ -171,22 +177,16 @@ using namespace QT_NAMESPACE; - (void)devicePairingStarted:(id)sender { Q_UNUSED(sender) - // - NSLog(@"pairing started ... to be implemented"); } - (void)devicePairingConnecting:(id)sender { Q_UNUSED(sender) - - NSLog(@"connecting ... to be implemented"); } - (void)deviceParingPINCodeRequest:(id)sender { Q_UNUSED(sender) - - NSLog(@"pin code request ... to be implemented"); } - (void)devicePairingUserConfirmationRequest:(id)sender @@ -206,8 +206,6 @@ using namespace QT_NAMESPACE; { Q_UNUSED(sender) Q_UNUSED(passkey) - - NSLog(@"pass key notification ... to be implemented"); } - (void)devicePairingFinished:(id)sender error:(IOReturn)error |