diff options
-rw-r--r-- | src/bluetooth/qbluetoothsocket.cpp | 2 | ||||
-rw-r--r-- | src/bluetooth/qbluetoothsocket_android.cpp | 5 | ||||
-rw-r--r-- | src/bluetooth/qbluetoothsocket_bluez.cpp | 5 | ||||
-rw-r--r-- | src/bluetooth/qbluetoothsocket_p.cpp | 5 | ||||
-rw-r--r-- | src/bluetooth/qbluetoothsocket_p.h | 1 | ||||
-rw-r--r-- | src/bluetooth/qbluetoothsocket_winrt.cpp | 5 |
6 files changed, 22 insertions, 1 deletions
diff --git a/src/bluetooth/qbluetoothsocket.cpp b/src/bluetooth/qbluetoothsocket.cpp index 57dd3aa0..2f38ed04 100644 --- a/src/bluetooth/qbluetoothsocket.cpp +++ b/src/bluetooth/qbluetoothsocket.cpp @@ -300,7 +300,7 @@ qint64 QBluetoothSocket::bytesAvailable() const qint64 QBluetoothSocket::bytesToWrite() const { Q_D(const QBluetoothSocket); - return d->txBuffer.size(); + return d->bytesToWrite(); } /*! diff --git a/src/bluetooth/qbluetoothsocket_android.cpp b/src/bluetooth/qbluetoothsocket_android.cpp index c2fc96f2..6a92f29a 100644 --- a/src/bluetooth/qbluetoothsocket_android.cpp +++ b/src/bluetooth/qbluetoothsocket_android.cpp @@ -879,6 +879,11 @@ qint64 QBluetoothSocketPrivate::bytesAvailable() const return 0; } +qint64 QBluetoothSocketPrivate::bytesToWrite() const +{ + return 0; // nothing because always unbuffered +} + bool QBluetoothSocketPrivate::canReadLine() const { // We cannot access buffer directly as it is part of different thread diff --git a/src/bluetooth/qbluetoothsocket_bluez.cpp b/src/bluetooth/qbluetoothsocket_bluez.cpp index dca1bc3b..6aef811a 100644 --- a/src/bluetooth/qbluetoothsocket_bluez.cpp +++ b/src/bluetooth/qbluetoothsocket_bluez.cpp @@ -592,6 +592,11 @@ qint64 QBluetoothSocketPrivate::bytesAvailable() const return buffer.size(); } +qint64 QBluetoothSocketPrivate::bytesToWrite() const +{ + return txBuffer.size(); +} + bool QBluetoothSocketPrivate::canReadLine() const { return buffer.canReadLine(); diff --git a/src/bluetooth/qbluetoothsocket_p.cpp b/src/bluetooth/qbluetoothsocket_p.cpp index dc14e97b..39d483d6 100644 --- a/src/bluetooth/qbluetoothsocket_p.cpp +++ b/src/bluetooth/qbluetoothsocket_p.cpp @@ -163,4 +163,9 @@ bool QBluetoothSocketPrivate::canReadLine() const return false; } +qint64 QBluetoothSocketPrivate::bytesToWrite() const +{ + return 0; +} + QT_END_NAMESPACE diff --git a/src/bluetooth/qbluetoothsocket_p.h b/src/bluetooth/qbluetoothsocket_p.h index cfa342bb..9aabf660 100644 --- a/src/bluetooth/qbluetoothsocket_p.h +++ b/src/bluetooth/qbluetoothsocket_p.h @@ -167,6 +167,7 @@ public: qint64 bytesAvailable() const; bool canReadLine() const; + qint64 bytesToWrite() const; public: QPrivateLinearBuffer buffer; diff --git a/src/bluetooth/qbluetoothsocket_winrt.cpp b/src/bluetooth/qbluetoothsocket_winrt.cpp index a56e10fa..4a9d1b93 100644 --- a/src/bluetooth/qbluetoothsocket_winrt.cpp +++ b/src/bluetooth/qbluetoothsocket_winrt.cpp @@ -569,6 +569,11 @@ qint64 QBluetoothSocketPrivate::bytesAvailable() const return buffer.size(); } +qint64 QBluetoothSocketPrivate::bytesToWrite() const +{ + return 0; // nothing because always unbuffered +} + bool QBluetoothSocketPrivate::canReadLine() const { return buffer.canReadLine(); |