summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@qt.io>2019-03-20 11:07:35 +0100
committerAlex Blasche <alexander.blasche@qt.io>2019-04-01 11:37:34 +0000
commit38bb5bae0a05407ec180a140c00231a39ef23cd2 (patch)
treec20c9a0e65482cc87996845d3aeda5a499f19cdc
parentd21da7829811d129b96ca0eb2a56cb6bdae4f1a7 (diff)
Enable bttestui to test QBluetoothSocket::bytesWritten() signal
Change-Id: Id29865014043963f7edf22cc81a2bd7a91c55a60 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
-rw-r--r--tests/bttestui/btlocaldevice.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/bttestui/btlocaldevice.cpp b/tests/bttestui/btlocaldevice.cpp
index fb3a0270..55b99fc3 100644
--- a/tests/bttestui/btlocaldevice.cpp
+++ b/tests/bttestui/btlocaldevice.cpp
@@ -93,6 +93,9 @@ BtLocalDevice::BtLocalDevice(QObject *parent) :
connect(socket, &QBluetoothSocket::connected, this, &BtLocalDevice::socketConnected);
connect(socket, &QBluetoothSocket::disconnected, this, &BtLocalDevice::socketDisconnected);
connect(socket, &QIODevice::readyRead, this, &BtLocalDevice::readData);
+ connect(socket, &QBluetoothSocket::bytesWritten, this, [](qint64 bytesWritten){
+ qDebug() << "Bytes Written to Client socket:" << bytesWritten;
+ });
setSecFlags(static_cast<int>(socket->preferredSecurityFlags()));
server = new QBluetoothServer(SOCKET_PROTOCOL, this);
@@ -682,6 +685,9 @@ void BtLocalDevice::serverNewConnection()
connect(client, QOverload<QBluetoothSocket::SocketError>::of(&QBluetoothSocket::error),
this, &BtLocalDevice::socketError);
connect(client, &QBluetoothSocket::connected, this, &BtLocalDevice::socketConnected);
+ connect(client, &QBluetoothSocket::bytesWritten, this, [](qint64 bytesWritten){
+ qDebug() << "Bytes Written to Server socket:" << bytesWritten;
+ });
serverSockets.append(client);
}