diff options
author | Alex Blasche <alexander.blasche@qt.io> | 2017-06-29 11:01:08 +0200 |
---|---|---|
committer | Alex Blasche <alexander.blasche@qt.io> | 2017-06-29 09:57:24 +0000 |
commit | 31990acd549f3f811b60caefa6371ec8fc09bb4b (patch) | |
tree | a0c8ce25f302998f07f5e7d3f9274ee6e6088e86 /src/bluetooth/qbluetoothsocket_winrt.cpp | |
parent | 2f596f9b80084df8897215d8436ffbbdc962198a (diff) |
Add indirection for QBluetoothSocket::bytesToWrite()
Not all platforms use txbuffer for writes. Fortunately those platforms
who do not use it do not use any buffering at all. Hence bytesToWrite()
returned the correct value as txbuffer always had size zero. Therefore
this patch is effectively a NOP.
Nevertheless this patch encourages the right implementation across the
platform.
This does not affect macOS as it has a separate implementation for
QBluetoothSocket::bytesToWrite().
Task-number: QTBUG-58190
Change-Id: Ic05f4358b079f612ee7e0e4dbb7fb9aa78fd6556
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src/bluetooth/qbluetoothsocket_winrt.cpp')
-rw-r--r-- | src/bluetooth/qbluetoothsocket_winrt.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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(); |