From 65e9991501fc810497e102ab66bd8dd438cebcdc Mon Sep 17 00:00:00 2001 From: Anton Lundin Date: Tue, 29 Sep 2015 21:12:54 +0200 Subject: qtserialbluetooth: Remove no-op calls waitForReadyRead and waitForBytesWritten not overridden in QBluetoothSocket and the default implementation in QIODevice are just no-ops that always return false. This removes those calls to lessen the confusion for anyone who looks at the code. Signed-off-by: Anton Lundin Signed-off-by: Dirk Hohndel --- qtserialbluetooth.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/qtserialbluetooth.cpp b/qtserialbluetooth.cpp index 6f93d8cab..6a3360c7d 100644 --- a/qtserialbluetooth.cpp +++ b/qtserialbluetooth.cpp @@ -236,8 +236,6 @@ static int qt_serial_read(serial_t *device, void* data, unsigned int size) while(nbytes < size && device->socket->state() == QBluetoothSocket::ConnectedState) { - device->socket->waitForReadyRead(device->timeout); - rc = device->socket->read((char *) data + nbytes, size - nbytes); if (rc < 0) { @@ -295,8 +293,6 @@ static int qt_serial_write(serial_t *device, const void* data, unsigned int size while(nbytes < size && device->socket->state() == QBluetoothSocket::ConnectedState) { - device->socket->waitForBytesWritten(device->timeout); - rc = device->socket->write((char *) data + nbytes, size - nbytes); if (rc < 0) { -- cgit v1.2.3-70-g09d2