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 2022-11-21 15:28:59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/qt6-mqtt (Old) and /work/SRC/openSUSE:Factory/.qt6-mqtt.new.1597 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qt6-mqtt" Mon Nov 21 15:28:59 2022 rev:17 rq:1036909 version:6.4.1 Changes: -------- --- /work/SRC/openSUSE:Factory/qt6-mqtt/qt6-mqtt.changes 2022-10-01 17:43:29.369706469 +0200 +++ /work/SRC/openSUSE:Factory/.qt6-mqtt.new.1597/qt6-mqtt.changes 2022-11-21 15:29:06.580500285 +0100 @@ -1,0 +2,6 @@ +Tue Nov 15 11:53:14 UTC 2022 - Christophe Giboudeaux <christo...@krop.fr> + +- Update to 6.4.1: + * https://www.qt.io/blog/qt-6.4.1-released + +------------------------------------------------------------------- Old: ---- qtmqtt-everywhere-src-6.4.0.tar.xz New: ---- qtmqtt-everywhere-src-6.4.1.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ qt6-mqtt.spec ++++++ --- /var/tmp/diff_new_pack.FzIgLW/_old 2022-11-21 15:29:07.488504894 +0100 +++ /var/tmp/diff_new_pack.FzIgLW/_new 2022-11-21 15:29:07.496504935 +0100 @@ -16,7 +16,7 @@ # -%define real_version 6.4.0 +%define real_version 6.4.1 %define short_version 6.4 %define tar_name qtmqtt-everywhere-src %define tar_suffix %{nil} @@ -27,7 +27,7 @@ %endif # Name: qt6-mqtt%{?pkg_suffix} -Version: 6.4.0 +Version: 6.4.1 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.FzIgLW/_old 2022-11-21 15:29:07.540505158 +0100 +++ /var/tmp/diff_new_pack.FzIgLW/_new 2022-11-21 15:29:07.544505178 +0100 @@ -1,9 +1,9 @@ <services> <service name="tar_scm" mode="disabled"> <param name="changesgenerate">disable</param> - <param name="version">6.4.0</param> + <param name="version">6.4.1</param> <param name="url">git://code.qt.io/qt/qtmqtt.git</param> - <param name="revision">v6.4.0</param> + <param name="revision">v6.4.1</param> <param name="scm">git</param> <param name="filename">qtmqtt-everywhere-src</param> </service> ++++++ qtmqtt-everywhere-src-6.4.0.tar.xz -> qtmqtt-everywhere-src-6.4.1.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.4.0/.cmake.conf new/qtmqtt-everywhere-src-6.4.1/.cmake.conf --- old/qtmqtt-everywhere-src-6.4.0/.cmake.conf 2022-09-23 13:50:51.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.4.1/.cmake.conf 2022-11-08 19:49:51.000000000 +0100 @@ -1,2 +1,2 @@ -set(QT_REPO_MODULE_VERSION "6.4.0") +set(QT_REPO_MODULE_VERSION "6.4.1") set(QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT "alpha1") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.4.0/dependencies.yaml new/qtmqtt-everywhere-src-6.4.1/dependencies.yaml --- old/qtmqtt-everywhere-src-6.4.0/dependencies.yaml 2022-09-23 13:50:51.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.4.1/dependencies.yaml 2022-11-08 19:49:51.000000000 +0100 @@ -1,7 +1,7 @@ dependencies: ../qtbase: - ref: bc7e63385522c2020168cf367a8b3b1e6c6bc65e + ref: 905755304a474c942346774d930b92e3665c1bab required: true ../qtdeclarative: - ref: 0c0f33b73e3259dbf35481d3f1ffb81a97b76190 + ref: a514640b2a38391fceaaac3ca01b390ad3d62f31 required: true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.4.0/examples/mqtt/quickpublication/qmlmqttclient.cpp new/qtmqtt-everywhere-src-6.4.1/examples/mqtt/quickpublication/qmlmqttclient.cpp --- old/qtmqtt-everywhere-src-6.4.0/examples/mqtt/quickpublication/qmlmqttclient.cpp 2022-09-23 13:50:51.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.4.1/examples/mqtt/quickpublication/qmlmqttclient.cpp 2022-11-08 19:49:51.000000000 +0100 @@ -6,12 +6,61 @@ #include <QMqttTopicName> QmlMqttClient::QmlMqttClient(QObject *parent) - : QMqttClient(parent) + : QObject(parent) { + connect(&m_client, &QMqttClient::hostnameChanged, this, &QmlMqttClient::hostnameChanged); + connect(&m_client, &QMqttClient::portChanged, this, &QmlMqttClient::portChanged); + connect(&m_client, &QMqttClient::stateChanged, this, &QmlMqttClient::stateChanged); +} + +void QmlMqttClient::connectToHost() +{ + m_client.connectToHost(); +} + +void QmlMqttClient::disconnectFromHost() +{ + m_client.disconnectFromHost(); +} + +const QString QmlMqttClient::hostname() const +{ + return m_client.hostname(); +} + +void QmlMqttClient::setHostname(const QString &newHostname) +{ + m_client.setHostname(newHostname); +} + +int QmlMqttClient::port() const +{ + return m_client.port(); +} + +void QmlMqttClient::setPort(int newPort) +{ + if (newPort < 0 || newPort > std::numeric_limits<quint16>::max()) { + qWarning() << "Trying to set invalid port number"; + return; + } + m_client.setPort(static_cast<quint16>(newPort)); + + m_client.state(); +} + +const QMqttClient::ClientState QmlMqttClient::state() const +{ + return m_client.state(); +} + +void QmlMqttClient::setState(const QMqttClient::ClientState &newState) +{ + m_client.setState(newState); } int QmlMqttClient::publish(const QString &topic, const QString &message, int qos, bool retain) { - auto result = QMqttClient::publish(QMqttTopicName(topic), message.toUtf8(), qos, retain); + auto result = m_client.publish(QMqttTopicName(topic), message.toUtf8(), qos, retain); return result; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.4.0/examples/mqtt/quickpublication/qmlmqttclient.h new/qtmqtt-everywhere-src-6.4.1/examples/mqtt/quickpublication/qmlmqttclient.h --- old/qtmqtt-everywhere-src-6.4.0/examples/mqtt/quickpublication/qmlmqttclient.h 2022-09-23 13:50:51.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.4.1/examples/mqtt/quickpublication/qmlmqttclient.h 2022-11-08 19:49:51.000000000 +0100 @@ -7,15 +7,38 @@ #include <QtCore/QMap> #include <QtMqtt/QMqttClient> -class QmlMqttClient : public QMqttClient +class QmlMqttClient : public QObject { Q_OBJECT + Q_PROPERTY(QString hostname READ hostname WRITE setHostname NOTIFY hostnameChanged) + Q_PROPERTY(int port READ port WRITE setPort NOTIFY portChanged) + Q_PROPERTY(QMqttClient::ClientState state READ state WRITE setState NOTIFY stateChanged) public: + QmlMqttClient(QObject *parent = nullptr); + Q_INVOKABLE void connectToHost(); + Q_INVOKABLE void disconnectFromHost(); Q_INVOKABLE int publish(const QString &topic, const QString &message, int qos = 0, bool retain = false); + + const QString hostname() const; + void setHostname(const QString &newHostname); + + int port() const; + void setPort(int newPort); + + const QMqttClient::ClientState state() const; + void setState(const QMqttClient::ClientState &newState); + +signals: + void hostnameChanged(); + void portChanged(); + + void stateChanged(); + private: Q_DISABLE_COPY(QmlMqttClient) + QMqttClient m_client; }; #endif // QMLMQTTCLIENT_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.4.0/examples/mqtt/quicksubscription/qmlmqttclient.cpp new/qtmqtt-everywhere-src-6.4.1/examples/mqtt/quicksubscription/qmlmqttclient.cpp --- old/qtmqtt-everywhere-src-6.4.0/examples/mqtt/quicksubscription/qmlmqttclient.cpp 2022-09-23 13:50:51.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.4.1/examples/mqtt/quicksubscription/qmlmqttclient.cpp 2022-11-08 19:49:51.000000000 +0100 @@ -4,31 +4,80 @@ #include "qmlmqttclient.h" #include <QDebug> +QmlMqttSubscription::QmlMqttSubscription(QMqttSubscription *s, QmlMqttClient *c) + : sub(s) + , client(c) +{ + connect(sub, &QMqttSubscription::messageReceived, this, &QmlMqttSubscription::handleMessage); + m_topic = sub->topic(); +} + +QmlMqttSubscription::~QmlMqttSubscription() +{ +} + QmlMqttClient::QmlMqttClient(QObject *parent) - : QMqttClient(parent) + : QObject(parent) +{ + connect(&m_client, &QMqttClient::hostnameChanged, this, &QmlMqttClient::hostnameChanged); + connect(&m_client, &QMqttClient::portChanged, this, &QmlMqttClient::portChanged); + connect(&m_client, &QMqttClient::stateChanged, this, &QmlMqttClient::stateChanged); +} + +void QmlMqttClient::connectToHost() +{ + m_client.connectToHost(); +} + +void QmlMqttClient::disconnectFromHost() { + m_client.disconnectFromHost(); } QmlMqttSubscription* QmlMqttClient::subscribe(const QString &topic) { - auto sub = QMqttClient::subscribe(topic, 0); + auto sub = m_client.subscribe(topic, 0); auto result = new QmlMqttSubscription(sub, this); return result; } -QmlMqttSubscription::QmlMqttSubscription(QMqttSubscription *s, QmlMqttClient *c) - : sub(s) - , client(c) +void QmlMqttSubscription::handleMessage(const QMqttMessage &qmsg) { - connect(sub, &QMqttSubscription::messageReceived, this, &QmlMqttSubscription::handleMessage); - m_topic = sub->topic(); + emit messageReceived(qmsg.payload()); } -QmlMqttSubscription::~QmlMqttSubscription() +const QString QmlMqttClient::hostname() const { + return m_client.hostname(); } -void QmlMqttSubscription::handleMessage(const QMqttMessage &qmsg) +void QmlMqttClient::setHostname(const QString &newHostname) { - emit messageReceived(qmsg.payload()); + m_client.setHostname(newHostname); +} + +int QmlMqttClient::port() const +{ + return m_client.port(); +} + +void QmlMqttClient::setPort(int newPort) +{ + if (newPort < 0 || newPort > std::numeric_limits<quint16>::max()) { + qWarning() << "Trying to set invalid port number"; + return; + } + m_client.setPort(static_cast<quint16>(newPort)); + + m_client.state(); +} + +const QMqttClient::ClientState QmlMqttClient::state() const +{ + return m_client.state(); +} + +void QmlMqttClient::setState(const QMqttClient::ClientState &newState) +{ + m_client.setState(newState); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.4.0/examples/mqtt/quicksubscription/qmlmqttclient.h new/qtmqtt-everywhere-src-6.4.1/examples/mqtt/quicksubscription/qmlmqttclient.h --- old/qtmqtt-everywhere-src-6.4.0/examples/mqtt/quicksubscription/qmlmqttclient.h 2022-09-23 13:50:51.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.4.1/examples/mqtt/quicksubscription/qmlmqttclient.h 2022-11-08 19:49:51.000000000 +0100 @@ -32,15 +32,38 @@ QMqttTopicFilter m_topic; }; -class QmlMqttClient : public QMqttClient +class QmlMqttClient : public QObject { Q_OBJECT + Q_PROPERTY(QString hostname READ hostname WRITE setHostname NOTIFY hostnameChanged) + Q_PROPERTY(int port READ port WRITE setPort NOTIFY portChanged) + Q_PROPERTY(QMqttClient::ClientState state READ state WRITE setState NOTIFY stateChanged) public: + QmlMqttClient(QObject *parent = nullptr); + Q_INVOKABLE void connectToHost(); + Q_INVOKABLE void disconnectFromHost(); Q_INVOKABLE QmlMqttSubscription *subscribe(const QString &topic); + + const QString hostname() const; + void setHostname(const QString &newHostname); + + int port() const; + void setPort(int newPort); + + const QMqttClient::ClientState state() const; + void setState(const QMqttClient::ClientState &newState); + +signals: + void hostnameChanged(); + void portChanged(); + + void stateChanged(); + private: Q_DISABLE_COPY(QmlMqttClient) + QMqttClient m_client; }; #endif // QMLMQTTCLIENT_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.4.0/src/mqtt/doc/src/external-resources.qdoc new/qtmqtt-everywhere-src-6.4.1/src/mqtt/doc/src/external-resources.qdoc --- old/qtmqtt-everywhere-src-6.4.0/src/mqtt/doc/src/external-resources.qdoc 2022-09-23 13:50:51.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.4.1/src/mqtt/doc/src/external-resources.qdoc 2022-11-08 19:49:51.000000000 +0100 @@ -2,6 +2,6 @@ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only /*! - \externalpage http://www.mqtt.org + \externalpage https://www.mqtt.org \title MQTT */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.4.0/src/mqtt/doc/src/overview.qdoc new/qtmqtt-everywhere-src-6.4.1/src/mqtt/doc/src/overview.qdoc --- old/qtmqtt-everywhere-src-6.4.0/src/mqtt/doc/src/overview.qdoc 2022-09-23 13:50:51.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.4.1/src/mqtt/doc/src/overview.qdoc 2022-11-08 19:49:51.000000000 +0100 @@ -3,7 +3,7 @@ /*! - \page mqtt-overview.html + \page qtmqtt-overview.html \title Qt MQTT Overview \brief Provides insight into the MQTT protocol and the Qt MQTT module. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.4.0/src/mqtt/qmqtttopicfilter.cpp new/qtmqtt-everywhere-src-6.4.1/src/mqtt/qmqtttopicfilter.cpp --- old/qtmqtt-everywhere-src-6.4.0/src/mqtt/qmqtttopicfilter.cpp 2022-09-23 13:50:51.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.4.1/src/mqtt/qmqtttopicfilter.cpp 2022-11-08 19:49:51.000000000 +0100 @@ -209,9 +209,24 @@ if (d->filter.endsWith(QLatin1Char('#'))) { QStringView root = QStringView{d->filter}.left(d->filter.size() - 1); + + if (root.isEmpty()) // Filter: # + return true; + if (root.endsWith(QLatin1Char('/'))) // '#' also represents the parent level! root = root.left(root.size() - 1); - return topic.startsWith(root); + + const auto filterLevels = root.split(QLatin1Char('/')); + const auto topicLevels = QStringView{topic}.split(QLatin1Char('/')); + + if (topicLevels.size() < filterLevels.size()) + return false; + + for (int i = 0; i < filterLevels.size(); ++i) { + if (filterLevels.at(i) != topicLevels.at(i)) + return false; + } + return true; } if (d->filter.contains(QLatin1Char('+'))) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.4.0/tests/auto/qmqtttopicfilter/tst_qmqtttopicfilter.cpp new/qtmqtt-everywhere-src-6.4.1/tests/auto/qmqtttopicfilter/tst_qmqtttopicfilter.cpp --- old/qtmqtt-everywhere-src-6.4.0/tests/auto/qmqtttopicfilter/tst_qmqtttopicfilter.cpp 2022-09-23 13:50:51.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.4.1/tests/auto/qmqtttopicfilter/tst_qmqtttopicfilter.cpp 2022-11-08 19:49:51.000000000 +0100 @@ -95,6 +95,9 @@ QVERIFY(QMqttTopicFilter("$SYS/monitor/+").match(QMqttTopicName("$SYS/monitor/Clients"))); QVERIFY(QMqttTopicFilter("$SYS/monitor/+").match(QMqttTopicName("$SYS/monitor/Clients"), QMqttTopicFilter::WildcardsDontMatchDollarTopicMatchOption)); + + QVERIFY(!QMqttTopicFilter{QLatin1String("x/#")}.match(QLatin1String("xy/foo"))); // QTBUG-92817 + QVERIFY(!QMqttTopicFilter{QLatin1String("x/y/#")}.match(QLatin1String("x"))); } void Tst_QMqttTopicFilter::usableWithQList()