From b2cebb6530fecedfa1facd8e7ff7020a4147b803 Mon Sep 17 00:00:00 2001 From: Alex Blasche Date: Tue, 1 Jul 2014 12:58:25 +0200 Subject: Add ability to abort server sockets via bttestui This equalizes the behavior of the Close and Abort button. Abort will disconnect the local client socket as well as all sockets which were established via the listening server socket. Change-Id: I68d3d7190641aab44612fa3fc00b38fdc31799a3 Reviewed-by: Fabian Bumberger --- tests/bttestui/btlocaldevice.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/bttestui') diff --git a/tests/bttestui/btlocaldevice.cpp b/tests/bttestui/btlocaldevice.cpp index 251b6dfc..f08a175c 100644 --- a/tests/bttestui/btlocaldevice.cpp +++ b/tests/bttestui/btlocaldevice.cpp @@ -391,6 +391,12 @@ void BtLocalDevice::abortSocket() qDebug() << "###### Disconnecting socket"; socket->abort(); } + + if (!serverSockets.isEmpty()) { + qDebug() << "###### Closing server sockets"; + foreach (QBluetoothSocket *s, serverSockets) + s->abort(); + } } void BtLocalDevice::socketConnected() -- cgit v1.2.3