summaryrefslogtreecommitdiffstats
path: root/tests/bttestui/btlocaldevice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bttestui/btlocaldevice.cpp')
-rw-r--r--tests/bttestui/btlocaldevice.cpp16
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)