diff options
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; } /*! |