diff options
author | Karsten Heimrich <karsten.heimrich@qt.io> | 2020-04-22 11:17:36 +0200 |
---|---|---|
committer | Karsten Heimrich <karsten.heimrich@qt.io> | 2020-04-22 14:25:59 +0200 |
commit | c24fd46221b98eb2e9248765ae32c0fccbebcd35 (patch) | |
tree | 0ec26d8205556d818326626470f4edc1ca74e449 | |
parent | ef2e04aeb4dcec04c1f21f7ef85470e07d80453e (diff) |
Update the docs on unhandled error conditions in QSerialport
Commit a1655d6ccf3 has deprecated some error conditions in
QSerialport. This patch adds a little bit more information
that these error conditions shall be handled in user code now.
Fixes: QTBUG-80930
Change-Id: I13e0a27db98729d038fef654a3a36d7091d45358
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
-rw-r--r-- | src/serialport/doc/src/index.qdoc | 2 | ||||
-rw-r--r-- | src/serialport/qserialport.cpp | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/serialport/doc/src/index.qdoc b/src/serialport/doc/src/index.qdoc index 041188e0..d5823d23 100644 --- a/src/serialport/doc/src/index.qdoc +++ b/src/serialport/doc/src/index.qdoc @@ -41,6 +41,8 @@ \li Text mode. \li Configuring timeouts and delays while reading or writing. \li Pinout signal change notification. + \li Special transceiver conditions, like Framing error, Parity error and + Break condition error. \endlist To use the serial port in your application, add the following include diff --git a/src/serialport/qserialport.cpp b/src/serialport/qserialport.cpp index 44d6cd14..69f42b2b 100644 --- a/src/serialport/qserialport.cpp +++ b/src/serialport/qserialport.cpp @@ -188,6 +188,12 @@ void QSerialPortPrivate::setError(const QSerialPortErrorInfo &errorInfo) errorOccurred() signal. You can also call error() to find the type of error that occurred last. + \note Not all error conditions are handled in a platform independent way in + QSerialport, as for example the Framing, Parity, and Break condition errors. + These kind of errors need to be handled by the application code, probably + using OS system specific ioctls on the device descriptor and/or parsing the + stream's byte-stuffing. + Programming with a blocking serial port is radically different from programming with a non-blocking serial port. A blocking serial port does not require an event loop and typically leads to simpler code. |