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 <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Anton Lundin 2015-09-29 21:12:54 +02:00 committed by Dirk Hohndel
parent edac07554c
commit 65e9991501

View file

@ -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) {