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 <[email protected]>
---
I'm CC'ing Thiago and Claudiu here, so they can take a look and stop me
if I've gone off by meds and misunderstood something here.

So, Dirk: Please wait for a comment from them before taking these patches.

 qtserialbluetooth.cpp | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/qtserialbluetooth.cpp b/qtserialbluetooth.cpp
index 6f93d8c..6a3360c 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) {
-- 
2.1.4

_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to