diff options
author | Liang Qi <liang.qi@qt.io> | 2017-06-07 12:07:20 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-06-07 13:31:18 +0200 |
commit | 55aa81e9acc736d162d3e4f775814ac91dbf1a80 (patch) | |
tree | 6f2965db3b993e8012c65dd291562b1d8d04556a /src/serialport/qserialport.cpp | |
parent | 65dba188d51d6dc67a15483f26c6b94a21abf5bc (diff) | |
parent | a7594fd4e883a33faffb8340d73547f882eccb29 (diff) | |
download | qtserialport-55aa81e9acc736d162d3e4f775814ac91dbf1a80.tar.gz |
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
.qmake.conf
src/serialport/qserialport_win.cpp
Change-Id: Icc832e218a1135cb82e780ccaa63abd990289eaf
Diffstat (limited to 'src/serialport/qserialport.cpp')
-rw-r--r-- | src/serialport/qserialport.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/serialport/qserialport.cpp b/src/serialport/qserialport.cpp index 4f9d180..7853f1a 100644 --- a/src/serialport/qserialport.cpp +++ b/src/serialport/qserialport.cpp @@ -956,6 +956,10 @@ bool QSerialPort::isDataTerminalReady() property; otherwise \c false is returned and the error code is set to NotOpenError. + \note An attempt to control the RTS signal in the HardwareControl mode + will fail with error code set to UnsupportedOperationError, because + the signal is automatically controlled by the driver. + \sa pinoutSignals() */ bool QSerialPort::setRequestToSend(bool set) @@ -1278,8 +1282,11 @@ qint64 QSerialPort::bytesAvailable() const */ qint64 QSerialPort::bytesToWrite() const { - Q_D(const QSerialPort); - return QIODevice::bytesToWrite() + d->writeBuffer.size(); + qint64 pendingBytes = QIODevice::bytesToWrite(); +#if defined(Q_OS_WIN32) + pendingBytes += d_func()->writeChunkBuffer.size(); +#endif + return pendingBytes; } /*! |