diff options
author | Alex Blasche <alexander.blasche@digia.com> | 2014-04-08 17:48:23 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-05-06 16:00:53 +0200 |
commit | 74449f1b0b2952dcbad9525c167b36fbf908696f (patch) | |
tree | 6e1a3f807ca07d678c6c340f4621039c8d5ac3af /tests/bttestui | |
parent | 0e60ecb374b15d488cc0e10b73458e550698aec6 (diff) |
Add Bluez5 support for QBluetoothLocalDevice
The pairing signals are not yet implemented. For details
see QTBUG-38401.
Task-number: QTBUG-32085
Change-Id: I2b4e9a97b880801ebbffe367a8ab98320dd7ef2f
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Diffstat (limited to 'tests/bttestui')
-rw-r--r-- | tests/bttestui/btlocaldevice.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/tests/bttestui/btlocaldevice.cpp b/tests/bttestui/btlocaldevice.cpp index 3a9b52b5..d67b13fb 100644 --- a/tests/bttestui/btlocaldevice.cpp +++ b/tests/bttestui/btlocaldevice.cpp @@ -144,10 +144,20 @@ void BtLocalDevice::requestPairingUpdate(bool isPairing) if (baddr.isNull()) return; - if (isPairing) - localDevice->requestPairing(baddr, QBluetoothLocalDevice::Paired); - else + + + if (isPairing) { + //toggle between authorized and non-authorized pairing to achieve better + //level of testing + static short pairing = 0; + if ((pairing%2) == 1) + localDevice->requestPairing(baddr, QBluetoothLocalDevice::Paired); + else + localDevice->requestPairing(baddr, QBluetoothLocalDevice::AuthorizedPaired); + pairing++; + } else { localDevice->requestPairing(baddr, QBluetoothLocalDevice::Unpaired); + } for (int i = 0; i < foundTestServers.count(); i++) { if (isPairing) |