diff options
author | Alex Blasche <alexander.blasche@qt.io> | 2018-09-25 11:12:34 +0200 |
---|---|---|
committer | Alex Blasche <alexander.blasche@qt.io> | 2018-09-26 06:21:36 +0000 |
commit | 266e8d9ecab68aa8367161c80d50675af78f0fb5 (patch) | |
tree | a0f70f189fba7be0e7ced49eddb35c13a059066b /tests/bttestui/btlocaldevice.cpp | |
parent | 343eea046cda781a224b94d1620f9325574837f7 (diff) |
Add limited PinCode pairing support to bttestui app
This help quicker testing of the feature.
Change-Id: I2389b1126ac2ea0ffc9dea4bb7561c683cf97088
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'tests/bttestui/btlocaldevice.cpp')
-rw-r--r-- | tests/bttestui/btlocaldevice.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/bttestui/btlocaldevice.cpp b/tests/bttestui/btlocaldevice.cpp index 54de57ca..3f0ebdaf 100644 --- a/tests/bttestui/btlocaldevice.cpp +++ b/tests/bttestui/btlocaldevice.cpp @@ -61,6 +61,8 @@ BtLocalDevice::BtLocalDevice(QObject *parent) : this, SLOT(disconnected(QBluetoothAddress))); connect(localDevice, SIGNAL(pairingDisplayConfirmation(QBluetoothAddress,QString)), this, SLOT(pairingDisplayConfirmation(QBluetoothAddress,QString))); + connect(localDevice, &QBluetoothLocalDevice::pairingDisplayPinCode, + this, &BtLocalDevice::pairingDisplayPinCode); if (localDevice->isValid()) { deviceAgent = new QBluetoothDeviceDiscoveryAgent(this); @@ -199,11 +201,15 @@ void BtLocalDevice::disconnected(const QBluetoothAddress &addr) void BtLocalDevice::pairingDisplayConfirmation(const QBluetoothAddress &address, const QString &pin) { - Q_UNUSED(pin); - Q_UNUSED(address); + qDebug() << "PairingDisplayConfirmation" << address << pin; QTimer::singleShot(3000, this, SLOT(confirmPairing())); } +void BtLocalDevice::pairingDisplayPinCode(const QBluetoothAddress &address, const QString &pin) +{ + qDebug() << "PairingDisplayPinCode" << address << pin; +} + void BtLocalDevice::confirmPairing() { static bool confirm = false; |