diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-12-15 03:05:25 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-12-15 03:05:25 +0100 |
commit | 1550439befd5a68185862b9422714d31790c79ef (patch) | |
tree | a536145d014a6251c585a0ed038a7d57f877a6c5 | |
parent | 054c8b4cc9556b503d87be4ead91dbd0f9921765 (diff) | |
parent | ce265ff81223bf7a5978e66dba59fb4b10469b9e (diff) |
Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: I65234fbfd7d1b691789336f733d638234e922c54
-rw-r--r-- | dist/changes-5.11.3 | 26 | ||||
-rw-r--r-- | src/serialbus/qmodbuspdu.cpp | 5 |
2 files changed, 29 insertions, 2 deletions
diff --git a/dist/changes-5.11.3 b/dist/changes-5.11.3 new file mode 100644 index 0000000..a3ad4ae --- /dev/null +++ b/dist/changes-5.11.3 @@ -0,0 +1,26 @@ +Qt 5.11.3 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.11.0 through 5.11.2. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + +http://doc.qt.io/qt-5/index.html + +The Qt version 5.11 series is binary compatible with the 5.10.x series. +Applications compiled for 5.10 will continue to run with 5.11. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + +https://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + +**************************************************************************** +* Qt 5.11.2 Changes * +**************************************************************************** + + - Fixed documentation for QModbusClient::timeoutChanged(). + + - [QTBUG-65684] Fixed memory leak in QModbusRtuSerialMaster. diff --git a/src/serialbus/qmodbuspdu.cpp b/src/serialbus/qmodbuspdu.cpp index f2a3abc..57398b9 100644 --- a/src/serialbus/qmodbuspdu.cpp +++ b/src/serialbus/qmodbuspdu.cpp @@ -105,9 +105,10 @@ static int minimumDataSize(const QModbusPdu &pdu, Type type) static QDataStream &pduFromStream(QDataStream &stream, QModbusPdu &pdu, Type type) { - QModbusPdu::FunctionCode code = QModbusPdu::Invalid; - if (stream.readRawData((char *) (&code), sizeof(quint8)) != sizeof(quint8)) + quint8 codeByte = 0; + if (stream.readRawData((char *) (&codeByte), sizeof(quint8)) != sizeof(quint8)) return stream; + QModbusPdu::FunctionCode code = (QModbusPdu::FunctionCode) codeByte; pdu.setFunctionCode(code); auto needsAdditionalRead = [](QModbusPdu &pdu, int size) -> bool { |