summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKari Oikarinen <kari.oikarinen@qt.io>2019-01-08 08:18:59 +0200
committerKari Oikarinen <kari.oikarinen@qt.io>2019-01-08 08:18:59 +0200
commitdec7fea8094497dc708e9be6c4b1cd0891611556 (patch)
treec472b94be4a8091b86a95811365e2543bc9fa49b
parentbbbda19310890c8ae27d0e72547d612d1d1ac0ad (diff)
parent2b51f76ab712690cc263516d628a4f8cbb723ba8 (diff)
Merge 5.12 into 5.12.1
-rw-r--r--.qmake.conf2
-rw-r--r--dist/changes-5.11.326
-rw-r--r--src/serialbus/qmodbuspdu.cpp5
3 files changed, 30 insertions, 3 deletions
diff --git a/.qmake.conf b/.qmake.conf
index 81e7e4e..35cf687 100644
--- a/.qmake.conf
+++ b/.qmake.conf
@@ -2,4 +2,4 @@ load(qt_build_config)
CONFIG += warning_clean
DEFINES += QT_NO_FOREACH
-MODULE_VERSION = 5.12.0
+MODULE_VERSION = 5.12.1
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 {