summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-12-11 10:18:39 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-12-11 10:18:39 +0100
commitce265ff81223bf7a5978e66dba59fb4b10469b9e (patch)
tree63656a1a51ca3d94836bf65a1d19bc1d8e92d836
parent1b4650e90da19d28758df76a00d0218a1f3241e5 (diff)
parentf0fdcdf0f42b92e27a15259dfe7da685666bdb85 (diff)
Merge remote-tracking branch 'origin/5.11' into 5.12
Conflicts: .qmake.conf Change-Id: Ia0da4c27d820778cb156a73cbad4fe79f0694267
-rw-r--r--dist/changes-5.11.326
-rw-r--r--src/serialbus/qmodbuspdu.cpp5
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 {