From 38bb5bae0a05407ec180a140c00231a39ef23cd2 Mon Sep 17 00:00:00 2001 From: Alex Blasche Date: Wed, 20 Mar 2019 11:07:35 +0100 Subject: Enable bttestui to test QBluetoothSocket::bytesWritten() signal Change-Id: Id29865014043963f7edf22cc81a2bd7a91c55a60 Reviewed-by: Oliver Wolff --- tests/bttestui/btlocaldevice.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests') 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(socket->preferredSecurityFlags())); server = new QBluetoothServer(SOCKET_PROTOCOL, this); @@ -682,6 +685,9 @@ void BtLocalDevice::serverNewConnection() connect(client, QOverload::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); } -- cgit v1.2.3