diff options
author | Denis Shienkov <denis.shienkov@gmail.com> | 2015-06-26 16:40:44 +0300 |
---|---|---|
committer | Denis Shienkov <denis.shienkov@gmail.com> | 2015-07-08 13:22:25 +0000 |
commit | 8919ea86c80001be7e826f5363f1b7548c7a8091 (patch) | |
tree | 14d8b27710aec73d50d579849616353e1e0a007e /src/serialport/qserialport.h | |
parent | 1eaa42c99d8442a40718b8560903b0bfeb401a0e (diff) | |
download | qtserialport-8919ea86c80001be7e826f5363f1b7548c7a8091.tar.gz |
Improve the processing of errors
Sometimes the error string would contain a wrong description which
did not correspond to the system error code. The reason was
qt_error_string() being called too late, when the system error
might have already been overwritten.
The error processing is now in QSPP::getSystemError(), which returns both
the error code and the error description as soon as possible.
* Now the QSPP::getSystemError() returns the new class
QSerialPortErrorInfo which contains all necessary fields.
* The new method QSPP::setError() which accepts the
QSerialPortErrorInfo as input parameter is used.
* The old private method QSP::setError() is removed, because
it is not used anywhere.
Change-Id: Ia7e4d617b863e2131175c52812cdf426ed963795
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Diffstat (limited to 'src/serialport/qserialport.h')
-rw-r--r-- | src/serialport/qserialport.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/serialport/qserialport.h b/src/serialport/qserialport.h index 7531e47..36ae788 100644 --- a/src/serialport/qserialport.h +++ b/src/serialport/qserialport.h @@ -276,8 +276,6 @@ protected: qint64 writeData(const char *data, qint64 maxSize) Q_DECL_OVERRIDE; private: - void setError(QSerialPort::SerialPortError error, const QString &errorString = QString()); - // ### Qt6: remove me. QSerialPortPrivate * const d_dummy; |