Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package qt6-mqtt for openSUSE:Factory checked in at 2025-08-29 18:36:03 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/qt6-mqtt (Old) and /work/SRC/openSUSE:Factory/.qt6-mqtt.new.1977 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qt6-mqtt" Fri Aug 29 18:36:03 2025 rev:37 rq:1301712 version:6.9.2 Changes: -------- --- /work/SRC/openSUSE:Factory/qt6-mqtt/qt6-mqtt.changes 2025-06-05 20:33:41.171664203 +0200 +++ /work/SRC/openSUSE:Factory/.qt6-mqtt.new.1977/qt6-mqtt.changes 2025-08-29 18:36:56.754518792 +0200 @@ -1,0 +2,6 @@ +Wed Aug 27 07:15:21 UTC 2025 - Christophe Marin <christo...@krop.fr> + +- Update to 6.9.2: + * https://www.qt.io/blog/qt-6.9.2-released + +------------------------------------------------------------------- Old: ---- qtmqtt-everywhere-src-6.9.1.tar.xz New: ---- qtmqtt-everywhere-src-6.9.2.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ qt6-mqtt.spec ++++++ --- /var/tmp/diff_new_pack.ztc6qA/_old 2025-08-29 18:36:57.454548715 +0200 +++ /var/tmp/diff_new_pack.ztc6qA/_new 2025-08-29 18:36:57.454548715 +0200 @@ -1,7 +1,7 @@ # # spec file for package qt6-mqtt # -# Copyright (c) 2025 SUSE LLC +# Copyright (c) 2025 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,7 +16,7 @@ # -%define real_version 6.9.1 +%define real_version 6.9.2 %define short_version 6.9 %define tar_name qtmqtt-everywhere-src %define tar_suffix %{nil} @@ -27,7 +27,7 @@ %endif # Name: qt6-mqtt%{?pkg_suffix} -Version: 6.9.1 +Version: 6.9.2 Release: 0 Summary: Qt 6 Module to implement MQTT protocol version 3.1 and 3.1.1 License: GPL-3.0-only WITH Qt-GPL-exception-1.0 ++++++ _service ++++++ --- /var/tmp/diff_new_pack.ztc6qA/_old 2025-08-29 18:36:57.506550938 +0200 +++ /var/tmp/diff_new_pack.ztc6qA/_new 2025-08-29 18:36:57.510551109 +0200 @@ -1,9 +1,9 @@ <services> <service name="tar_scm" mode="disabled"> <param name="changesgenerate">disable</param> - <param name="version">6.9.1</param> + <param name="version">6.9.2</param> <param name="url">git://code.qt.io/qt/qtmqtt.git</param> - <param name="revision">v6.9.1</param> + <param name="revision">v6.9.2</param> <param name="scm">git</param> <param name="filename">qtmqtt-everywhere-src</param> </service> ++++++ qtmqtt-everywhere-src-6.9.1.tar.xz -> qtmqtt-everywhere-src-6.9.2.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.9.1/.cmake.conf new/qtmqtt-everywhere-src-6.9.2/.cmake.conf --- old/qtmqtt-everywhere-src-6.9.1/.cmake.conf 2025-05-29 02:20:23.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.9.2/.cmake.conf 2025-08-18 01:36:47.000000000 +0200 @@ -1,4 +1,4 @@ -set(QT_REPO_MODULE_VERSION "6.9.1") +set(QT_REPO_MODULE_VERSION "6.9.2") set(QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT "alpha1") set(QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_NO_AS_CONST=1") list(APPEND QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_NO_FOREACH=1") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.9.1/dependencies.yaml new/qtmqtt-everywhere-src-6.9.2/dependencies.yaml --- old/qtmqtt-everywhere-src-6.9.1/dependencies.yaml 2025-05-29 02:20:23.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.9.2/dependencies.yaml 2025-08-18 01:36:47.000000000 +0200 @@ -1,7 +1,7 @@ dependencies: ../qtbase: - ref: 2ad23cd72d5f122f88ce95792a4323d639c27d25 + ref: 6f0d27d2e4ba5fa6562f738aaaf8eaf98ebf51e7 required: true ../qtdeclarative: - ref: 1e6adc3d5f1f4cbbb77b41911395782dff43cccd + ref: b653aebb2175203d86199b1d320fd10f939df3fc required: true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttauthenticationproperties.cpp new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttauthenticationproperties.cpp --- old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttauthenticationproperties.cpp 2025-05-29 02:20:23.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttauthenticationproperties.cpp 2025-08-18 01:36:47.000000000 +0200 @@ -1,5 +1,6 @@ // Copyright (C) 2018 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +// Qt-Security score:significant reason:default #include "qmqttauthenticationproperties.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttauthenticationproperties.h new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttauthenticationproperties.h --- old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttauthenticationproperties.h 2025-05-29 02:20:23.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttauthenticationproperties.h 2025-08-18 01:36:47.000000000 +0200 @@ -1,5 +1,6 @@ // Copyright (C) 2018 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +// Qt-Security score:significant reason:default #ifndef QMQTTAUTHENTICATIONPROPERTIES_H #define QMQTTAUTHENTICATIONPROPERTIES_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttclient.cpp new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttclient.cpp --- old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttclient.cpp 2025-05-29 02:20:23.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttclient.cpp 2025-08-18 01:36:47.000000000 +0200 @@ -1,5 +1,6 @@ // Copyright (C) 2017 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +// Qt-Security score:significant reason:default #include "qmqttclient.h" #include "qmqttclient_p.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttclient.h new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttclient.h --- old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttclient.h 2025-05-29 02:20:23.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttclient.h 2025-08-18 01:36:47.000000000 +0200 @@ -1,5 +1,6 @@ // Copyright (C) 2017 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +// Qt-Security score:significant reason:default #ifndef QTMQTTCLIENT_H #define QTMQTTCLIENT_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttclient_p.h new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttclient_p.h --- old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttclient_p.h 2025-05-29 02:20:23.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttclient_p.h 2025-08-18 01:36:47.000000000 +0200 @@ -1,5 +1,6 @@ // Copyright (C) 2017 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +// Qt-Security score:significant reason:default #ifndef QMQTTCLIENT_P_H #define QMQTTCLIENT_P_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttconnection.cpp new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttconnection.cpp --- old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttconnection.cpp 2025-05-29 02:20:23.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttconnection.cpp 2025-08-18 01:36:47.000000000 +0200 @@ -1,5 +1,6 @@ // Copyright (C) 2017 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +// Qt-Security score:critical reason:network-protocol #include "qmqttconnection_p.h" #include "qmqttconnectionproperties_p.h" @@ -56,6 +57,25 @@ return QString::fromUtf8(readBufferTyped<QByteArray>(dataSize)); } +bool QMqttConnection::isPendingUnsubscribe(QMqttSubscription *sub) const +{ + for (const auto [key, value] : m_pendingUnsubscriptions.asKeyValueRange()) { + if (value == sub) + return true; + } + return false; +} + +QMqttSubscription *QMqttConnection::findActiveSubscription(const QMqttTopicFilter &topic) const +{ + const auto range = m_activeSubscriptions.equal_range(topic); + for (auto it = range.first; it != range.second; ++it) { + if (!isPendingUnsubscribe(it.value())) + return it.value(); + } + return nullptr; +} + QMqttConnection::QMqttConnection(QObject *parent) : QObject(parent) { } @@ -456,18 +476,18 @@ const QString sharedSubscriptionName = topic.sharedSubscriptionName(); if (!sharedSubscriptionName.isEmpty()) { const QMqttTopicFilter filter(topic.filter().section(QLatin1Char('/'), 2)); - auto it = m_activeSubscriptions.constFind(filter); - if (it != m_activeSubscriptions.cend() && (*it)->sharedSubscriptionName() == sharedSubscriptionName) - return *it; + auto sub = findActiveSubscription(filter); + if (sub && (sub->sharedSubscriptionName() == sharedSubscriptionName)) + return sub; } else { - auto it = m_activeSubscriptions.constFind(topic); - if (it != m_activeSubscriptions.cend() && !(*it)->isSharedSubscription()) - return *it; + auto sub = findActiveSubscription(topic); + if (sub && !sub->isSharedSubscription()) + return sub; } } else { - auto it = m_activeSubscriptions.constFind(topic); - if (it != m_activeSubscriptions.cend()) - return *it; + auto sub = findActiveSubscription(topic); + if (sub) + return sub; } // has to have 0010 as bits 3-0, maybe update SUBSCRIBE instead? @@ -519,11 +539,13 @@ if (!topic.isValid()) return false; - if (!m_activeSubscriptions.contains(topic)) + auto sub = findActiveSubscription(topic); + if (!sub) + // Already unsubscribed return false; if (m_internalState != QMqttConnection::BrokerConnected) { - m_activeSubscriptions.remove(topic); + m_activeSubscriptions.remove(topic, sub); return true; } @@ -542,7 +564,6 @@ } packet.append(topic.filter().toUtf8()); - auto sub = m_activeSubscriptions[topic]; sub->setState(QMqttSubscription::UnsubscriptionPending); if (!writePacketToTransport(packet)) @@ -1559,7 +1580,7 @@ return; } - m_activeSubscriptions.remove(sub->topic()); + m_activeSubscriptions.remove(sub->topic(), sub); if (m_clientPrivate->m_protocolVersion == QMqttClient::MQTT_5_0) { readSubscriptionProperties(sub); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttconnection_p.h new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttconnection_p.h --- old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttconnection_p.h 2025-05-29 02:20:23.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttconnection_p.h 2025-08-18 01:36:47.000000000 +0200 @@ -1,5 +1,6 @@ // Copyright (C) 2017 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +// Qt-Security score:significant reason:default #ifndef QMQTTCONNECTION_P_H #define QMQTTCONNECTION_P_H @@ -116,6 +117,9 @@ void closeConnection(QMqttClient::ClientError error); QByteArray readBuffer(quint64 size); template<typename T> T readBufferTyped(qint64 *dataSize = nullptr); + bool isPendingUnsubscribe(QMqttSubscription *) const; + QMqttSubscription *findActiveSubscription(const QMqttTopicFilter &topic) const; + QByteArray m_readBuffer; int m_readPosition{0}; qint64 m_missingData{0}; @@ -128,9 +132,13 @@ QMqttControlPacket::PacketType m_currentPacket{QMqttControlPacket::UNKNOWN}; bool writePacketToTransport(const QMqttControlPacket &p); + + // I: There can be many occurences of different QMqttSubscription * with + // the same QMqttTopicFilter, but only one that is not in + // m_pendingUnsubscriptions. QHash<quint16, QMqttSubscription *> m_pendingSubscriptionAck; QHash<quint16, QMqttSubscription *> m_pendingUnsubscriptions; - QHash<QMqttTopicFilter, QMqttSubscription *> m_activeSubscriptions; + QMultiHash<QMqttTopicFilter, QMqttSubscription *> m_activeSubscriptions; QHash<quint16, QSharedPointer<QMqttControlPacket>> m_pendingMessages; QHash<quint16, QSharedPointer<QMqttControlPacket>> m_pendingReleaseMessages; InternalConnectionState m_internalState{BrokerDisconnected}; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttconnectionproperties.cpp new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttconnectionproperties.cpp --- old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttconnectionproperties.cpp 2025-05-29 02:20:23.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttconnectionproperties.cpp 2025-08-18 01:36:47.000000000 +0200 @@ -1,5 +1,6 @@ // Copyright (C) 2018 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +// Qt-Security score:significant reason:default #include "qmqttconnectionproperties.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttconnectionproperties.h new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttconnectionproperties.h --- old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttconnectionproperties.h 2025-05-29 02:20:23.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttconnectionproperties.h 2025-08-18 01:36:47.000000000 +0200 @@ -1,5 +1,6 @@ // Copyright (C) 2018 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +// Qt-Security score:significant reason:default #ifndef QMQTTCONNECTIONPROPERTIES_H #define QMQTTCONNECTIONPROPERTIES_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttconnectionproperties_p.h new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttconnectionproperties_p.h --- old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttconnectionproperties_p.h 2025-05-29 02:20:23.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttconnectionproperties_p.h 2025-08-18 01:36:47.000000000 +0200 @@ -1,5 +1,6 @@ // Copyright (C) 2018 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +// Qt-Security score:significant reason:default #ifndef QMQTTCONNECTIONPROPERTIES_P_H #define QMQTTCONNECTIONPROPERTIES_P_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttcontrolpacket.cpp new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttcontrolpacket.cpp --- old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttcontrolpacket.cpp 2025-05-29 02:20:23.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttcontrolpacket.cpp 2025-08-18 01:36:47.000000000 +0200 @@ -1,5 +1,6 @@ // Copyright (C) 2017 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +// Qt-Security score:critical reason:network-protocol #include "qmqttcontrolpacket_p.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttcontrolpacket_p.h new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttcontrolpacket_p.h --- old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttcontrolpacket_p.h 2025-05-29 02:20:23.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttcontrolpacket_p.h 2025-08-18 01:36:47.000000000 +0200 @@ -1,5 +1,6 @@ // Copyright (C) 2017 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +// Qt-Security score:significant reason:default #ifndef QMQTTCONTROLPACKET_P_H #define QMQTTCONTROLPACKET_P_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttglobal.h new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttglobal.h --- old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttglobal.h 2025-05-29 02:20:23.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttglobal.h 2025-08-18 01:36:47.000000000 +0200 @@ -1,5 +1,6 @@ // Copyright (C) 2017 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +// Qt-Security score:significant reason:default #ifndef QTQMQTTGLOBAL_H #define QTQMQTTGLOBAL_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttglobal_p.h new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttglobal_p.h --- old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttglobal_p.h 2025-05-29 02:20:23.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttglobal_p.h 2025-08-18 01:36:47.000000000 +0200 @@ -1,5 +1,6 @@ // Copyright (C) 2024 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +// Qt-Security score:significant reason:default #ifndef QTQMQTTGLOBAL_P_H #define QTQMQTTGLOBAL_P_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttmessage.cpp new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttmessage.cpp --- old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttmessage.cpp 2025-05-29 02:20:23.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttmessage.cpp 2025-08-18 01:36:47.000000000 +0200 @@ -1,5 +1,6 @@ // Copyright (C) 2017 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +// Qt-Security score:significant reason:default #include "qmqttmessage.h" #include "qmqttmessage_p.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttmessage.h new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttmessage.h --- old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttmessage.h 2025-05-29 02:20:23.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttmessage.h 2025-08-18 01:36:47.000000000 +0200 @@ -1,5 +1,6 @@ // Copyright (C) 2017 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +// Qt-Security score:significant reason:default #ifndef QMQTTMESSAGE_H #define QMQTTMESSAGE_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttmessage_p.h new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttmessage_p.h --- old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttmessage_p.h 2025-05-29 02:20:23.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttmessage_p.h 2025-08-18 01:36:47.000000000 +0200 @@ -1,5 +1,6 @@ // Copyright (C) 2018 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +// Qt-Security score:significant reason:default #ifndef QMQTTMESSAGE_P_H #define QMQTTMESSAGE_P_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttpublishproperties.cpp new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttpublishproperties.cpp --- old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttpublishproperties.cpp 2025-05-29 02:20:23.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttpublishproperties.cpp 2025-08-18 01:36:47.000000000 +0200 @@ -1,5 +1,6 @@ // Copyright (C) 2018 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +// Qt-Security score:significant reason:default #include "qmqttpublishproperties.h" #include "qmqttpublishproperties_p.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttpublishproperties.h new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttpublishproperties.h --- old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttpublishproperties.h 2025-05-29 02:20:23.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttpublishproperties.h 2025-08-18 01:36:47.000000000 +0200 @@ -1,5 +1,6 @@ // Copyright (C) 2018 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +// Qt-Security score:significant reason:default #ifndef QMQTTPUBLISHPROPERTIES_H #define QMQTTPUBLISHPROPERTIES_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttpublishproperties_p.h new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttpublishproperties_p.h --- old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttpublishproperties_p.h 2025-05-29 02:20:23.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttpublishproperties_p.h 2025-08-18 01:36:47.000000000 +0200 @@ -1,5 +1,6 @@ // Copyright (C) 2018 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +// Qt-Security score:significant reason:default #ifndef QMQTTPUBLISHPROPERTIES_P_H #define QMQTTPUBLISHPROPERTIES_P_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttsubscription.cpp new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttsubscription.cpp --- old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttsubscription.cpp 2025-05-29 02:20:23.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttsubscription.cpp 2025-08-18 01:36:47.000000000 +0200 @@ -1,5 +1,6 @@ // Copyright (C) 2017 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +// Qt-Security score:significant reason:default #include "qmqttsubscription.h" #include "qmqttsubscription_p.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttsubscription.h new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttsubscription.h --- old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttsubscription.h 2025-05-29 02:20:23.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttsubscription.h 2025-08-18 01:36:47.000000000 +0200 @@ -1,5 +1,6 @@ // Copyright (C) 2017 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +// Qt-Security score:significant reason:default #ifndef QMQTTSUBSCRIPTION_H #define QMQTTSUBSCRIPTION_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttsubscription_p.h new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttsubscription_p.h --- old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttsubscription_p.h 2025-05-29 02:20:23.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttsubscription_p.h 2025-08-18 01:36:47.000000000 +0200 @@ -1,5 +1,6 @@ // Copyright (C) 2017 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +// Qt-Security score:significant reason:default #ifndef QMQTTSUBSCRIPTION_P_H #define QMQTTSUBSCRIPTION_P_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttsubscriptionproperties.cpp new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttsubscriptionproperties.cpp --- old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttsubscriptionproperties.cpp 2025-05-29 02:20:23.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttsubscriptionproperties.cpp 2025-08-18 01:36:47.000000000 +0200 @@ -1,5 +1,6 @@ // Copyright (C) 2018 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +// Qt-Security score:significant reason:default #include "qmqttsubscriptionproperties.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttsubscriptionproperties.h new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttsubscriptionproperties.h --- old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqttsubscriptionproperties.h 2025-05-29 02:20:23.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqttsubscriptionproperties.h 2025-08-18 01:36:47.000000000 +0200 @@ -1,5 +1,6 @@ // Copyright (C) 2018 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +// Qt-Security score:significant reason:default #ifndef QMQTTSUBSCRIPTIONPROPERTIES_H #define QMQTTSUBSCRIPTIONPROPERTIES_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqtttopicfilter.cpp new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqtttopicfilter.cpp --- old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqtttopicfilter.cpp 2025-05-29 02:20:23.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqtttopicfilter.cpp 2025-08-18 01:36:47.000000000 +0200 @@ -1,5 +1,6 @@ // Copyright (C) 2017 Lorenz Haas // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +// Qt-Security score:critical reason:data-parser #include "qmqtttopicfilter.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqtttopicfilter.h new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqtttopicfilter.h --- old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqtttopicfilter.h 2025-05-29 02:20:23.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqtttopicfilter.h 2025-08-18 01:36:47.000000000 +0200 @@ -1,5 +1,6 @@ // Copyright (C) 2017 Lorenz Haas // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +// Qt-Security score:significant reason:default #ifndef QMQTTTOPICFILTER_H #define QMQTTTOPICFILTER_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqtttopicname.cpp new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqtttopicname.cpp --- old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqtttopicname.cpp 2025-05-29 02:20:23.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqtttopicname.cpp 2025-08-18 01:36:47.000000000 +0200 @@ -1,5 +1,6 @@ // Copyright (C) 2017 Lorenz Haas // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +// Qt-Security score:significant reason:default #include "qmqtttopicname.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqtttopicname.h new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqtttopicname.h --- old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqtttopicname.h 2025-05-29 02:20:23.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqtttopicname.h 2025-08-18 01:36:47.000000000 +0200 @@ -1,5 +1,6 @@ // Copyright (C) 2017 Lorenz Haas // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +// Qt-Security score:significant reason:default #ifndef QMQTTTOPICNAME_H #define QMQTTTOPICNAME_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqtttype.cpp new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqtttype.cpp --- old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqtttype.cpp 2025-05-29 02:20:23.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqtttype.cpp 2025-08-18 01:36:47.000000000 +0200 @@ -1,5 +1,6 @@ // Copyright (C) 2018 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +// Qt-Security score:significant reason:default #include "qmqtttype.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqtttype.h new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqtttype.h --- old/qtmqtt-everywhere-src-6.9.1/src/mqtt/qmqtttype.h 2025-05-29 02:20:23.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.9.2/src/mqtt/qmqtttype.h 2025-08-18 01:36:47.000000000 +0200 @@ -1,5 +1,6 @@ // Copyright (C) 2018 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only +// Qt-Security score:significant reason:default #ifndef QMQTTTYPE_H #define QMQTTTYPE_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.9.1/tests/auto/qmqttsubscription/tst_qmqttsubscription.cpp new/qtmqtt-everywhere-src-6.9.2/tests/auto/qmqttsubscription/tst_qmqttsubscription.cpp --- old/qtmqtt-everywhere-src-6.9.1/tests/auto/qmqttsubscription/tst_qmqttsubscription.cpp 2025-05-29 02:20:23.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.9.2/tests/auto/qmqttsubscription/tst_qmqttsubscription.cpp 2025-08-18 01:36:47.000000000 +0200 @@ -31,6 +31,9 @@ void noLocal(); void qtbug_106203(); void qtbug_104478(); + void qtbug_135653_connected(); + void qtbug_135653_not_connected(); + void qtbug_135653_not_unsubscribed(); private: void createAndSubscribe(QMqttClient *c, QMqttSubscription **sub, const QString &topic); QProcess m_brokerProcess; @@ -482,6 +485,89 @@ QTRY_VERIFY2(client.state() == QMqttClient::Disconnected, "Could not disconnect from broker."); } +void Tst_QMqttSubscription::qtbug_135653_connected() +{ + VersionClient(QMqttClient::ProtocolVersion(0), client); + client.setHostname(m_testBroker); + client.setPort(m_port); + client.connectToHost(); + QTRY_VERIFY2(client.state() == QMqttClient::Connected, "Could not connect to broker."); + + const QString topic(QLatin1String("test/foo/bar/test3")); + + QMqttSubscription *subscriptions[10] = { 0 }; + for (int i = 0; i < 10; ++i) { + bool received = false; + subscriptions[i] = client.subscribe(topic); + connect(subscriptions[i], &QMqttSubscription::messageReceived, subscriptions[i], [&client, topic, &received](QMqttMessage msg) { + received = (msg.payload() == "Hello World"); + }); + client.publish(topic, QString(QLatin1String("Hello World")).toLocal8Bit(), 1, true); + QTRY_VERIFY2(received, "Could not receive message."); + client.unsubscribe(topic); + client.unsubscribe(topic); + } + + for (int i = 0; i < 10; ++i) { + QVERIFY(subscriptions[i]); + for (int j = i + 1; j < 10; ++j) + QVERIFY(subscriptions[i] != subscriptions[j]); + } +} + +void Tst_QMqttSubscription::qtbug_135653_not_connected() +{ + VersionClient(QMqttClient::ProtocolVersion(0), client); + client.setHostname(m_testBroker); + client.setPort(m_port); + + const QString topic(QLatin1String("test/foo/bar/test4")); + + QMqttSubscription *subscriptions[10] = { 0 }; + for (int i = 0; i < 10; ++i) { + bool received = false; + client.connectToHost(); + QTRY_VERIFY2(client.state() == QMqttClient::Connected, "Could not connect to broker."); + subscriptions[i] = client.subscribe(topic); + connect(subscriptions[i], &QMqttSubscription::messageReceived, subscriptions[i], [&client, topic, &received](QMqttMessage msg) { + received = (msg.payload() == "Hello World"); + }); + client.publish(topic, QString(QLatin1String("Hello World")).toLocal8Bit(), 1, true); + QTRY_VERIFY2(received, "Could not receive message."); + client.disconnectFromHost(); + QTRY_VERIFY2(client.state() == QMqttClient::Disconnected, "Could not disconnect from broker."); + client.unsubscribe(topic); + client.unsubscribe(topic); + } + for (int i = 0; i < 10; ++i) { + QVERIFY(subscriptions[i]); + for (int j = i + 1; j < 10; ++j) + QVERIFY(subscriptions[i] != subscriptions[j]); + } +} + +void Tst_QMqttSubscription::qtbug_135653_not_unsubscribed() +{ + + const QString topic(QLatin1String("test/foo/bar/test5")); + + QMqttSubscription *subscriptions[10] = { 0 }; + for (int i = 0; i < 10; ++i) { + bool received = false; + VersionClient(QMqttClient::ProtocolVersion(0), client); + client.setHostname(m_testBroker); + client.setPort(m_port); + client.connectToHost(); + QTRY_VERIFY2(client.state() == QMqttClient::Connected, "Could not connect to broker."); + subscriptions[i] = client.subscribe(topic); + connect(subscriptions[i], &QMqttSubscription::messageReceived, subscriptions[i], [&client, topic, &received](QMqttMessage msg) { + received = (msg.payload() == "Hello World"); + }); + client.publish(topic, QString(QLatin1String("Hello World")).toLocal8Bit(), 1, true); + QTRY_VERIFY2(received, "Could not receive message."); + } +} + QTEST_MAIN(Tst_QMqttSubscription) #include "tst_qmqttsubscription.moc"