1
0
mirror of https://github.com/qt/qtmqtt.git synced 2026-10-25 16:16:26 +00:00
Commit Graph

1127 Commits

Author SHA1 Message Date
Tatiana Borisova
5b5aa01569 PINGRESP from the network should not push the counter below zero
- finalize_pingresp() lowers m_pingTimeout every time, with no lower
limit. A broker can send a pile of unasked-for replies to push the
counter deep below zero, and then the client can spend some unexpected
amount of time to reach back the number that means:
"the broker has stopped answering, drop the link.”
- The fix prohibits pushing the counter below zero.

Task-number: QTBUG-149662
Pick-to: 6.8
Change-Id: I7b25e8ac3f83fa262a19010df9a91b2ee1c006fd
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 33538c5143)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 88430cff7a)
2026-09-01 19:12:35 +00:00
Tatiana Borisova
e5185f5eab Skip remaining data for messages with unknown requests
- finalize_suback() and finalize_unsuback() read the 2-byte request ID.
If no matching request was found, they returned immediately.
However, m_missingData remained non-zero.
The leftover bytes are then incorrectly interpreted as the header of
the next message!

- This change fixes the issue universally for all handlers in the
processDataHelper().

Pick-to: 6.8
Task-number: QTBUG-149570
Change-Id: I06c86414c3297caa386059a02fdec5c3765a0315
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 9e0428b917)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit eea36a1e4c)
2026-09-01 16:12:01 +00:00
Qt Submodule Update Bot
ad0d2402ee Update dependencies on '6.11' in qt/qtmqtt
Change-Id: Ic57bc017cbb0f3b68484745686b0fd710e5ee630
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2026-09-01 08:13:15 +00:00
Qt Submodule Update Bot
f2a493c46d Update dependencies on '6.11' in qt/qtmqtt
Change-Id: I599ff9dc4c6a6c6d4581c5920c96e9686db90022
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2026-08-31 10:48:27 +00:00
Tatiana Borisova
1b62f5e3b5 Fix topic alias bounds and storage sizes
- In the f8ecf4d56a we found that the
m_receiveAliases bounds check used a wrong property:
m_clientPrivate->m_serverConnectionProperties.maximumTopicAlias(),
but it must use instead:
m_clientPrivate->m_connectionProperties.maximumTopicAlias().

So, the idea is m_receiveAliases is sized according to the maximum
topic alias value declared by the client in CONNECT, while
m_publishAliases is sized according to the maximum value declared
by the server in CONNACK.

The previous fix did not update all related code.
1) The resize() calls for m_receiveAliases and m_publishAliases
still used the wrong properties.
2) The bounds check for m_publishAliases still used the client's
maximumTopicAlias() value instead of the server's.

- Update the resize() calls to use the appropriate connection
properties and fix the bounds check for m_publishAliases.

Amends f8ecf4d56a

Pick-to: 6.8
Task-number: QTBUG-149564
Change-Id: I252c67966bf28c6994f34b19024d1b7894748473
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 011eb1e424)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 86544d2644)
2026-08-28 20:48:30 +00:00
Tatiana Borisova
ec91ec4f64 Stop parsing after closeConnection()
- Parsing continued after closeConnection(), leaving the client in the
"connected" state with a dead socket. This led to a permanent,
unrecoverable wedge in Release builds and a crash in Debug builds.

- Check whether the client is already disconnected before changing its
state to BrokerConnected.

Pick-to: 6.8
Task-number: QTBUG-149565
Change-Id: I13d45c24d24fe862d9aec6a7e421f5ef4d494db0
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit c94175ff43)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit f5f164e7b3)
2026-08-28 17:15:46 +00:00
Tatiana Borisova
84db57140f Check readVariableByteInteger() return value
- On error, readVariableByteInteger() closes the connection and
returns-1. In this case, message handling should stop.

- Add checks for the return value to stop processing when -1 is returned.

Pick-to: 6.8
Task-number: QTBUG-149565
Change-Id: I8f6cc8d6f3011a89d3bd4033a3432f383e1e9164
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 13288574c1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 514890bd67)
2026-08-28 17:15:40 +00:00
Tatiana Borisova
0c32814e88 Number overflow while rejecting a too-long length
- The length reader checked its 4-byte limit after doing the maths.
So, a 5th byte was multiplied in and overflows before the value
was thrown away. But it was not noticed, because we thrown it away
and returned -1.

- The fix moves iteration++ and if (iteration > 4) before the
calculation, preventing the overflow.

Pick-to: 6.8
Task-number: QTBUG-149571
Change-Id: I78c2063c7e01af3e8f196f824216d31de92fab48
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit ecaf42152e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 1556fcfaef)
2026-08-28 17:15:34 +00:00
Qt Submodule Update Bot
a70d7a12cc Update dependencies on '6.11' in qt/qtmqtt
Change-Id: If4e29e0563d769b049629d8113e377fd6f679608
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2026-08-28 09:21:00 +00:00
Qt Submodule Update Bot
5340fd8096 Update dependencies on '6.11' in qt/qtmqtt
Change-Id: I96993d3d58ed4843faebac143d6523751b600d4c
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2026-08-27 09:42:37 +00:00
Qt Submodule Update Bot
fab1387f06 Update dependencies on '6.11' in qt/qtmqtt
Change-Id: Id40c1d5ba1f1df3dfc97376b8818a3c1a5edf01a
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2026-08-25 21:56:53 +00:00
Qt Submodule Update Bot
92de8c94e4 Update dependencies on '6.11' in qt/qtmqtt
Change-Id: Ic21c90633bfa9910c87b613fb1b5737b6d95944f
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2026-08-24 09:07:33 +00:00
Qt Submodule Update Bot
3ef5009846 Update dependencies on '6.11' in qt/qtmqtt
Change-Id: Ia4c81c9e4b37affe99a6b968db922c6109fe7d6e
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2026-08-21 13:47:54 +00:00
Qt Submodule Update Bot
3f5e183947 Update dependencies on '6.11' in qt/qtmqtt
Change-Id: Icc20396300e3590afa3270021ba01a5574581598
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2026-08-20 09:17:44 +00:00
Qt Submodule Update Bot
55d326d5b0 Update dependencies on '6.11' in qt/qtmqtt
Change-Id: I2617fb2eeafe9faf8f2a40746952980d96b88393
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2026-08-19 11:35:43 +00:00
Qt Submodule Update Bot
b256d5d579 Update dependencies on '6.11' in qt/qtmqtt
Change-Id: I7ac8428e241d997b48f4aedc91c12926c6e1a6a0
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2026-08-18 09:48:08 +00:00
Tatiana Borisova
933ff3bfce Update to coin_module_test_template_v3.yaml
- The main differences between v2 and v3 are:
  * `coin_module_test_template_v2.yaml` ignores autotest return
    codes because the `COIN_CTEST_IGNORE_EXIT_CODE` flag is set.
  * The Axivion build was moved from coin_module_build_template_v2.yaml
    to coin_module_test_template_v3.yaml in commit
    c3ddec2f15a1cf806d8df444952cb2c2231ae4ad
- Switch the qtmqtt submodule to the newer v3 version to improve
the submodule CI experience for autotests and restore Axivion
checks.

Change-Id: I1695c8ca1af616512dff437a0a4cdbd0491412d4
Reviewed-by: Toni Saario <toni.saario@qt.io>
(cherry picked from commit 96d602b65f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit ad2e999485)
2026-08-17 12:02:57 +00:00
Qt Submodule Update Bot
8695c3f603 Update dependencies on '6.11' in qt/qtmqtt
Change-Id: Ia31e2c685d4dd1d8e86eb016a6c84c39cff0c5bf
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2026-08-17 08:55:05 +00:00
Qt Submodule Update Bot
a689727a17 Update dependencies on '6.11' in qt/qtmqtt
Change-Id: I4ccff6cd5ca3d95a0e7bea54d07fc099393e2634
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2026-08-14 16:09:43 +00:00
Jani Heikkinen
67795d7e8e Bump version to 6.11.3
Change-Id: I5ca9c85e24c04cfa97339ed3a898529a25192027
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2026-08-12 11:44:16 +00:00
Qt Submodule Update Bot
bfde2b57ea Update dependencies on '6.11' in qt/qtmqtt
Change-Id: I43074fae785feea051df7693bea2d62306030608
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2026-08-12 11:44:15 +00:00
Qt Submodule Update Bot
3413bb88f2 Update dependencies on '6.11' in qt/qtmqtt
Change-Id: Ia177e36a044e139dd277539b5b1034c1447648ed
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2026-08-04 09:02:13 +00:00
Qt Submodule Update Bot
9ed91b8442 Update dependencies on '6.11' in qt/qtmqtt
Change-Id: I9c5e64e5dc54c3dc3f07bd412285c4f6f0dd8f21
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2026-07-31 17:52:16 +00:00
Jani Heikkinen
b0e342cbb6 Replace Q_ENUMS with Q_ENUM
Amends ea3dc64d3f,
7467bbdc84, and
ea0d792a44 (all before 6.0).

Fixes: QTBUG-148625
Pick-to: 6.8
Change-Id: I2f9b24f7e32d437cce258dfdce0d669c8d2638e1
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit ebd3d87293)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 3b7642ab9b)
2026-07-29 14:14:51 +00:00
Qt Submodule Update Bot
5e436e7cb7 Update dependencies on '6.11' in qt/qtmqtt
Change-Id: Ie2c13b59a08c7baaacc85a84d598862650e8e241
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2026-07-28 10:08:44 +00:00
Qt Submodule Update Bot
1be2b6c8bb Update dependencies on '6.11' in qt/qtmqtt
Change-Id: Id13b608c093a6348e8dc8a019e5b46025449b7ab
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2026-07-24 08:52:40 +00:00
Qt Submodule Update Bot
0302f57f79 Update dependencies on '6.11' in qt/qtmqtt
Change-Id: I247bb1bb3c2a62bd7da03db3263310f3e1a5e192
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2026-07-14 08:29:33 +00:00
Qt Submodule Update Bot
c76bd5bb78 Update dependencies on '6.11' in qt/qtmqtt
Change-Id: Ia9d6419ab5bd288b5a5a63b34ac2584ad981128a
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2026-05-27 09:19:06 +00:00
Qt Submodule Update Bot
a01f668f2c Update dependencies on '6.11' in qt/qtmqtt
Change-Id: I98f0c2940e23db1b16329704a181d552102281aa
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2026-05-22 16:48:37 +00:00
Qt Submodule Update Bot
ab8335dc2d Update dependencies on '6.11' in qt/qtmqtt
Change-Id: I2e91ea6e76d07aea4f945d2e868b8cb956691a50
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2026-05-20 11:27:24 +00:00
Qt Submodule Update Bot
e5e27908e1 Update dependencies on '6.11' in qt/qtmqtt
Change-Id: I5f6f1c48276da3a63dbaa5d1019aef70198ba2c9
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2026-05-19 12:10:31 +00:00
Qt Submodule Update Bot
7b9058546f Update dependencies on '6.11' in qt/qtmqtt
Change-Id: Ib9b36cfc1f3df51439d86a99ae4d077c5a82efed
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2026-05-08 08:45:07 +00:00
Marc Mutz
a0c0d77321 Disable 1-to-2-arg qHash() adapter in qtmqtt
Task-number: QTBUG-145851
Change-Id: Ic9f6a64b8aa99aad7682e5e6379d304bcff3a7d7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 24ec59ffbb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2026-05-04 13:51:41 +00:00
Qt Submodule Update Bot
605560d39a Update dependencies on '6.11' in qt/qtmqtt
Change-Id: I062356ad8aac8238b5a89af0354963feb8799897
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2026-04-30 11:39:29 +00:00
Qt Submodule Update Bot
573a27b958 Update dependencies on '6.11' in qt/qtmqtt
Change-Id: I23f87612132ba59055f17930cb7e3ea82114cfbb
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2026-04-28 20:05:50 +00:00
Jani Heikkinen
860e9892c3 Bump version to 6.11.2
Change-Id: I0b6f2eb3a3e240d6ae8e479662bd140ad306396b
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2026-04-28 20:05:48 +00:00
Qt Submodule Update Bot
f48e1e7b0c Update dependencies on '6.11' in qt/qtmqtt
Change-Id: I0d6ae0f3f718cc67389bbd5ef6d97f0672a283be
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2026-04-24 02:47:03 +00:00
Qt Submodule Update Bot
287c1564e3 Update dependencies on '6.11' in qt/qtmqtt
Change-Id: I532cecee18a9090984ebe74a4e112a8bd2279a3e
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2026-04-23 09:11:42 +00:00
Qt Submodule Update Bot
0cab6640a1 Update dependencies on '6.11' in qt/qtmqtt
Change-Id: I8eeedd84cd8d66082c059c34dd3081cb55cc86ea
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2026-04-17 19:51:00 +00:00
Qt Submodule Update Bot
e741077526 Update dependencies on '6.11' in qt/qtmqtt
Change-Id: I4a12fcc5e891d805d2fb56fcade7ac3a537ba157
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2026-04-14 17:38:10 +00:00
Qt Submodule Update Bot
36891f6961 Update dependencies on '6.11' in qt/qtmqtt
Change-Id: Ie5706ca591e42c90775ba5dcb0b2fdc2742a50ca
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2026-04-08 15:32:31 +00:00
Qt Submodule Update Bot
0ec3c81443 Update dependencies on '6.11' in qt/qtmqtt
Change-Id: Ia01e92f8008e66c5b5207f6abeb625aa02897147
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2026-04-01 08:05:18 +00:00
Qt Submodule Update Bot
81f7864a4f Update dependencies on '6.11' in qt/qtmqtt
Change-Id: I939b59d5e3c729d95f3196e49427d2bd88c948c3
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2026-03-31 07:44:57 +00:00
Qt Submodule Update Bot
36be7c1a8e Update dependencies on '6.11' in qt/qtmqtt
Change-Id: I72b791043b60d46d415ceb7d88bbf61b66e8180c
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2026-03-30 07:45:12 +00:00
Qt Submodule Update Bot
79972cc43a Update dependencies on '6.11' in qt/qtmqtt
Change-Id: I930fd9bb449ddc9abc0852f50ed5e4b4de6ee01a
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2026-03-27 07:35:56 +00:00
Qt Submodule Update Bot
b75a064729 Update dependencies on '6.11' in qt/qtmqtt
Change-Id: Ibfd40317799c7e9872558d4fbd60a8746a4e3ec7
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2026-03-26 09:57:35 +00:00
Qt Submodule Update Bot
8445440db7 Update dependencies on '6.11' in qt/qtmqtt
Change-Id: Ie08acc6cbf196356c9d8e7a0098bc8a1308980d6
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2026-03-24 10:06:47 +00:00
Marc Mutz
3368252b0d Tst_QMqttSubscription: fix -Wunused-lambda-capture
Says Clang:

  tst_qmqttsubscription.cpp:515:92: warning: lambda capture 'client' is not used [-Wunused-lambda-capture]
    515 |         connect(subscriptions[i], &QMqttSubscription::messageReceived, subscriptions[i], [&client, topic, &received](QMqttMessage msg) {
        |                                                                                           ~^~~~~~~
  tst_qmqttsubscription.cpp:545:92: warning: lambda capture 'client' is not used [-Wunused-lambda-capture]
    545 |         connect(subscriptions[i], &QMqttSubscription::messageReceived, subscriptions[i], [&client, topic, &received](QMqttMessage msg) {
        |                                                                                           ~^~~~~~~
  tst_qmqttsubscription.cpp:576:92: warning: lambda capture 'client' is not used [-Wunused-lambda-capture]
    576 |         connect(subscriptions[i], &QMqttSubscription::messageReceived, subscriptions[i], [&client, topic, &received](QMqttMessage msg) {
        |                                                                                           ~^~~~~~~

Fix by removing the problematic capture. I don't know why it doesn't
complain about `topic`, which also looks unused.

Amends c383083270 (picked to 6.8).

Pick-to: 6.10 6.8
Change-Id: I52850ae4ff9b5e2faee86cd8252d78ce5f0908ff
Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
(cherry picked from commit a3c58404a4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2026-03-24 08:37:57 +00:00
Qt Submodule Update Bot
8f031f14fb Update dependencies on '6.11' in qt/qtmqtt
Change-Id: Idb23d0a72c5c530512ae3e218369a7b4ab885592
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2026-03-12 15:02:18 +00:00
Jerome Pasion
df33bda3d3 Doc: Add alt text for \image tags for qtmqtt
Alternate text (alt text) improves the documentation experience for
screen readers and for other accessibility tools.

Task-number: QTBUG-135098
Change-Id: Ia1793ff3e0bacd8cfdad2e8c04725a5093ed30aa
Reviewed-by: David Boddie <david.boddie@qt.io>
(cherry picked from commit 34656ac5ba)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2026-03-11 14:31:33 +00:00