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 2023-07-26 13:22:40 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/qt6-mqtt (Old) and /work/SRC/openSUSE:Factory/.qt6-mqtt.new.15225 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qt6-mqtt" Wed Jul 26 13:22:40 2023 rev:22 rq:1099996 version:6.5.2 Changes: -------- --- /work/SRC/openSUSE:Factory/qt6-mqtt/qt6-mqtt.changes 2023-05-28 19:22:57.261002002 +0200 +++ /work/SRC/openSUSE:Factory/.qt6-mqtt.new.15225/qt6-mqtt.changes 2023-07-26 13:23:07.375713672 +0200 @@ -1,0 +2,6 @@ +Thu Jul 20 08:56:15 UTC 2023 - Christophe Marin <christo...@krop.fr> + +- Update to 6.5.2 + * https://www.qt.io/blog/qt-6.5.2-released-1 + +------------------------------------------------------------------- Old: ---- qtmqtt-everywhere-src-6.5.1.tar.xz New: ---- qtmqtt-everywhere-src-6.5.2.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ qt6-mqtt.spec ++++++ --- /var/tmp/diff_new_pack.EJ8UQr/_old 2023-07-26 13:23:08.079717657 +0200 +++ /var/tmp/diff_new_pack.EJ8UQr/_new 2023-07-26 13:23:08.083717680 +0200 @@ -16,7 +16,7 @@ # -%define real_version 6.5.1 +%define real_version 6.5.2 %define short_version 6.5 %define tar_name qtmqtt-everywhere-src %define tar_suffix %{nil} @@ -27,7 +27,7 @@ %endif # Name: qt6-mqtt%{?pkg_suffix} -Version: 6.5.1 +Version: 6.5.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.EJ8UQr/_old 2023-07-26 13:23:08.123717906 +0200 +++ /var/tmp/diff_new_pack.EJ8UQr/_new 2023-07-26 13:23:08.127717929 +0200 @@ -1,9 +1,9 @@ <services> <service name="tar_scm" mode="disabled"> <param name="changesgenerate">disable</param> - <param name="version">6.5.1</param> + <param name="version">6.5.2</param> <param name="url">git://code.qt.io/qt/qtmqtt.git</param> - <param name="revision">v6.5.1</param> + <param name="revision">v6.5.2</param> <param name="scm">git</param> <param name="filename">qtmqtt-everywhere-src</param> </service> ++++++ qtmqtt-everywhere-src-6.5.1.tar.xz -> qtmqtt-everywhere-src-6.5.2.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.5.1/.cmake.conf new/qtmqtt-everywhere-src-6.5.2/.cmake.conf --- old/qtmqtt-everywhere-src-6.5.1/.cmake.conf 2023-05-16 11:46:45.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.5.2/.cmake.conf 2023-07-07 14:29:57.000000000 +0200 @@ -1,3 +1,3 @@ -set(QT_REPO_MODULE_VERSION "6.5.1") +set(QT_REPO_MODULE_VERSION "6.5.2") set(QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT "alpha1") set(QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_NO_AS_CONST=1") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.5.1/CMakeLists.txt new/qtmqtt-everywhere-src-6.5.2/CMakeLists.txt --- old/qtmqtt-everywhere-src-6.5.1/CMakeLists.txt 2023-05-16 11:46:45.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.5.2/CMakeLists.txt 2023-07-07 14:29:57.000000000 +0200 @@ -14,4 +14,6 @@ find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals Core Network) find_package(Qt6 ${PROJECT_VERSION} CONFIG OPTIONAL_COMPONENTS Quick WebSockets # For tests Gui Widgets) # For examples +qt_internal_project_setup() + qt_build_repo() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.5.1/conanfile.py new/qtmqtt-everywhere-src-6.5.2/conanfile.py --- old/qtmqtt-everywhere-src-6.5.1/conanfile.py 2023-05-16 11:46:45.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.5.2/conanfile.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,34 +0,0 @@ -# Copyright (C) 2021 The Qt Company Ltd. -# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -from conans import ConanFile -import re -from pathlib import Path - - -def _parse_qt_version_by_key(key: str) -> str: - with open(Path(__file__).parent.resolve() / ".cmake.conf") as f: - m = re.search(fr'{key} .*"(.*)"', f.read()) - return m.group(1) if m else "" - - -def _get_qt_minor_version() -> str: - return ".".join(_parse_qt_version_by_key("QT_REPO_MODULE_VERSION").split(".")[:2]) - - -class QtMqtt(ConanFile): - name = "qtmqtt" - license = "GPL-3.0+, Commercial Qt License Agreement" - author = "The Qt Company <https://www.qt.io/contact-us>" - url = "https://code.qt.io/cgit/qt/qtmqtt.git" - description = ( - "Qt MQTT is a machine-to-machine (M2M) protocol utilizing the " - "publish-and-subscribe paradigm." - ) - topics = "qt", "qt6", "MQTT", "M2M" - settings = "os", "compiler", "arch", "build_type" - # for referencing the version number and prerelease tag and dependencies info - exports = ".cmake.conf", "dependencies.yaml" - exports_sources = "*", "!conan*.*" - python_requires = f"qt-conan-common/{_get_qt_minor_version()}@qt/everywhere" - python_requires_extend = "qt-conan-common.QtLeafModule" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.5.1/dependencies.yaml new/qtmqtt-everywhere-src-6.5.2/dependencies.yaml --- old/qtmqtt-everywhere-src-6.5.1/dependencies.yaml 2023-05-16 11:46:45.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.5.2/dependencies.yaml 2023-07-07 14:29:57.000000000 +0200 @@ -1,7 +1,7 @@ dependencies: ../qtbase: - ref: 55aee8697512af105dfefabc1e2ec41d4df1e45e + ref: af457a9f0f7eb1a2a7d11f495da508faab91a442 required: true ../qtdeclarative: - ref: 65651dc1d333e2aded18b0d6f0b71c35e5b40c1c + ref: f289063ff19588a11dd79213632785cfda2909a0 required: true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.5.1/examples/mqtt/quicksubscription/CMakeLists.txt new/qtmqtt-everywhere-src-6.5.2/examples/mqtt/quicksubscription/CMakeLists.txt --- old/qtmqtt-everywhere-src-6.5.1/examples/mqtt/quicksubscription/CMakeLists.txt 2023-05-16 11:46:45.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.5.2/examples/mqtt/quicksubscription/CMakeLists.txt 2023-07-07 14:29:57.000000000 +0200 @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(quicksubscription LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,21 +12,19 @@ find_package(Qt6 REQUIRED COMPONENTS Core Gui Mqtt Qml Quick) +qt_standard_project_setup(REQUIRES 6.5) + qt_add_executable(quicksubscription + WIN32 + MACOSX_BUNDLE main.cpp - qmlmqttclient.cpp qmlmqttclient.h -) - -set_target_properties(quicksubscription PROPERTIES - WIN32_EXECUTABLE TRUE - MACOSX_BUNDLE TRUE ) target_compile_definitions(quicksubscription PUBLIC QT_DEPRECATED_WARNINGS ) -target_link_libraries(quicksubscription PUBLIC +target_link_libraries(quicksubscription PRIVATE Qt::Core Qt::Gui Qt::Mqtt @@ -36,16 +32,12 @@ Qt::Quick ) -# Resources: -set(qml_resource_files - "main.qml" -) - -qt6_add_resources(quicksubscription "qml" - PREFIX - "/" - FILES - ${qml_resource_files} +qt_add_qml_module(quicksubscription + URI subscription + QML_FILES + "Main.qml" + SOURCES + qmlmqttclient.cpp qmlmqttclient.h ) install(TARGETS quicksubscription diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.5.1/examples/mqtt/quicksubscription/Main.qml new/qtmqtt-everywhere-src-6.5.2/examples/mqtt/quicksubscription/Main.qml --- old/qtmqtt-everywhere-src-6.5.1/examples/mqtt/quicksubscription/Main.qml 1970-01-01 01:00:00.000000000 +0100 +++ new/qtmqtt-everywhere-src-6.5.2/examples/mqtt/quicksubscription/Main.qml 2023-07-07 14:29:57.000000000 +0200 @@ -0,0 +1,155 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick 2.8 +import QtQuick.Window 2.2 +import QtQuick.Controls 2.1 +import QtQuick.Layouts 1.1 + +Window { + visible: true + width: 640 + height: 480 + title: qsTr("Qt Quick MQTT Subscription Example") + id: root + + property var tempSubscription: 0 + + MqttClient { + id: client + hostname: hostnameField.text + port: portField.text + } + + ListModel { + id: messageModel + } + + function addMessage(payload) + { + messageModel.insert(0, {"payload" : payload}) + + if (messageModel.count >= 100) + messageModel.remove(99) + } + + GridLayout { + anchors.fill: parent + anchors.margins: 10 + columns: 2 + + Label { + text: "Hostname:" + enabled: client.state === MqttClient.Disconnected + } + + TextField { + id: hostnameField + Layout.fillWidth: true + text: "test.mosquitto.org" + placeholderText: "<Enter host running MQTT broker>" + enabled: client.state === MqttClient.Disconnected + } + + Label { + text: "Port:" + enabled: client.state === MqttClient.Disconnected + } + + TextField { + id: portField + Layout.fillWidth: true + text: "1883" + placeholderText: "<Port>" + inputMethodHints: Qt.ImhDigitsOnly + enabled: client.state === MqttClient.Disconnected + } + + Button { + id: connectButton + Layout.columnSpan: 2 + Layout.fillWidth: true + text: client.state === MqttClient.Connected ? "Disconnect" : "Connect" + onClicked: { + if (client.state === MqttClient.Connected) { + client.disconnectFromHost() + messageModel.clear() + tempSubscription.destroy() + tempSubscription = 0 + } else + client.connectToHost() + } + } + + RowLayout { + enabled: client.state === MqttClient.Connected + Layout.columnSpan: 2 + Layout.fillWidth: true + + Label { + text: "Topic:" + } + + TextField { + id: subField + placeholderText: "<Subscription topic>" + Layout.fillWidth: true + enabled: tempSubscription === 0 + } + + Button { + id: subButton + text: "Subscribe" + visible: tempSubscription === 0 + onClicked: { + if (subField.text.length === 0) { + console.log("No topic specified to subscribe to.") + return + } + tempSubscription = client.subscribe(subField.text) + tempSubscription.messageReceived.connect(addMessage) + } + } + } + + ListView { + id: messageView + model: messageModel + height: 300 + width: 200 + Layout.columnSpan: 2 + Layout.fillHeight: true + Layout.fillWidth: true + clip: true + delegate: Rectangle { + width: messageView.width + height: 30 + color: index % 2 ? "#DDDDDD" : "#888888" + radius: 5 + Text { + text: payload + anchors.centerIn: parent + } + } + } + + Label { + function stateToString(value) { + if (value === 0) + return "Disconnected" + else if (value === 1) + return "Connecting" + else if (value === 2) + return "Connected" + else + return "Unknown" + } + + Layout.columnSpan: 2 + Layout.fillWidth: true + color: "#333333" + text: "Status:" + stateToString(client.state) + "(" + client.state + ")" + enabled: client.state === MqttClient.Connected + } + } +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.5.1/examples/mqtt/quicksubscription/main.cpp new/qtmqtt-everywhere-src-6.5.2/examples/mqtt/quicksubscription/main.cpp --- old/qtmqtt-everywhere-src-6.5.1/examples/mqtt/quicksubscription/main.cpp 2023-05-16 11:46:45.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.5.2/examples/mqtt/quicksubscription/main.cpp 2023-07-07 14:29:57.000000000 +0200 @@ -1,24 +1,21 @@ // Copyright (C) 2017 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause -#include "qmlmqttclient.h" +#include <QtQml/qqmlapplicationengine.h> +#include <QtGui/qguiapplication.h> -#include <QGuiApplication> -#include <QQmlApplicationEngine> -#include <QLoggingCategory> +using namespace Qt::StringLiterals; int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); - QQmlApplicationEngine engine; - qmlRegisterType<QmlMqttClient>("MqttClient", 1, 0, "MqttClient"); - qmlRegisterUncreatableType<QmlMqttSubscription>("MqttClient", 1, 0, "MqttSubscription", QLatin1String("Subscriptions are read-only")); + QObject::connect( + &engine, &QQmlApplicationEngine::objectCreationFailed, &app, + []() { QCoreApplication::exit(EXIT_FAILURE); }, Qt::QueuedConnection); - engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); - if (engine.rootObjects().isEmpty()) - return -1; + engine.loadFromModule(u"subscription"_s, u"Main"_s); - return app.exec(); + return QGuiApplication::exec(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.5.1/examples/mqtt/quicksubscription/main.qml new/qtmqtt-everywhere-src-6.5.2/examples/mqtt/quicksubscription/main.qml --- old/qtmqtt-everywhere-src-6.5.1/examples/mqtt/quicksubscription/main.qml 2023-05-16 11:46:45.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.5.2/examples/mqtt/quicksubscription/main.qml 1970-01-01 01:00:00.000000000 +0100 @@ -1,156 +0,0 @@ -// Copyright (C) 2017 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause - -import QtQuick 2.8 -import QtQuick.Window 2.2 -import QtQuick.Controls 2.1 -import QtQuick.Layouts 1.1 -import MqttClient 1.0 - -Window { - visible: true - width: 640 - height: 480 - title: qsTr("Qt Quick MQTT Subscription Example") - id: root - - property var tempSubscription: 0 - - MqttClient { - id: client - hostname: hostnameField.text - port: portField.text - } - - ListModel { - id: messageModel - } - - function addMessage(payload) - { - messageModel.insert(0, {"payload" : payload}) - - if (messageModel.count >= 100) - messageModel.remove(99) - } - - GridLayout { - anchors.fill: parent - anchors.margins: 10 - columns: 2 - - Label { - text: "Hostname:" - enabled: client.state === MqttClient.Disconnected - } - - TextField { - id: hostnameField - Layout.fillWidth: true - text: "test.mosquitto.org" - placeholderText: "<Enter host running MQTT broker>" - enabled: client.state === MqttClient.Disconnected - } - - Label { - text: "Port:" - enabled: client.state === MqttClient.Disconnected - } - - TextField { - id: portField - Layout.fillWidth: true - text: "1883" - placeholderText: "<Port>" - inputMethodHints: Qt.ImhDigitsOnly - enabled: client.state === MqttClient.Disconnected - } - - Button { - id: connectButton - Layout.columnSpan: 2 - Layout.fillWidth: true - text: client.state === MqttClient.Connected ? "Disconnect" : "Connect" - onClicked: { - if (client.state === MqttClient.Connected) { - client.disconnectFromHost() - messageModel.clear() - tempSubscription.destroy() - tempSubscription = 0 - } else - client.connectToHost() - } - } - - RowLayout { - enabled: client.state === MqttClient.Connected - Layout.columnSpan: 2 - Layout.fillWidth: true - - Label { - text: "Topic:" - } - - TextField { - id: subField - placeholderText: "<Subscription topic>" - Layout.fillWidth: true - enabled: tempSubscription === 0 - } - - Button { - id: subButton - text: "Subscribe" - visible: tempSubscription === 0 - onClicked: { - if (subField.text.length === 0) { - console.log("No topic specified to subscribe to.") - return - } - tempSubscription = client.subscribe(subField.text) - tempSubscription.messageReceived.connect(addMessage) - } - } - } - - ListView { - id: messageView - model: messageModel - height: 300 - width: 200 - Layout.columnSpan: 2 - Layout.fillHeight: true - Layout.fillWidth: true - clip: true - delegate: Rectangle { - width: messageView.width - height: 30 - color: index % 2 ? "#DDDDDD" : "#888888" - radius: 5 - Text { - text: payload - anchors.centerIn: parent - } - } - } - - Label { - function stateToString(value) { - if (value === 0) - return "Disconnected" - else if (value === 1) - return "Connecting" - else if (value === 2) - return "Connected" - else - return "Unknown" - } - - Layout.columnSpan: 2 - Layout.fillWidth: true - color: "#333333" - text: "Status:" + stateToString(client.state) + "(" + client.state + ")" - enabled: client.state === MqttClient.Connected - } - } -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.5.1/examples/mqtt/quicksubscription/qml.qrc new/qtmqtt-everywhere-src-6.5.2/examples/mqtt/quicksubscription/qml.qrc --- old/qtmqtt-everywhere-src-6.5.1/examples/mqtt/quicksubscription/qml.qrc 2023-05-16 11:46:45.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.5.2/examples/mqtt/quicksubscription/qml.qrc 1970-01-01 01:00:00.000000000 +0100 @@ -1,5 +0,0 @@ -<RCC> - <qresource prefix="/"> - <file>main.qml</file> - </qresource> -</RCC> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.5.1/examples/mqtt/quicksubscription/qmldir new/qtmqtt-everywhere-src-6.5.2/examples/mqtt/quicksubscription/qmldir --- old/qtmqtt-everywhere-src-6.5.1/examples/mqtt/quicksubscription/qmldir 1970-01-01 01:00:00.000000000 +0100 +++ new/qtmqtt-everywhere-src-6.5.2/examples/mqtt/quicksubscription/qmldir 2023-07-07 14:29:57.000000000 +0200 @@ -0,0 +1,4 @@ +module subscription + +prefer :/qt/qml/subscription/ +Main 1.0 Main.qml diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.5.1/examples/mqtt/quicksubscription/qmlmqttclient.h new/qtmqtt-everywhere-src-6.5.2/examples/mqtt/quicksubscription/qmlmqttclient.h --- old/qtmqtt-everywhere-src-6.5.1/examples/mqtt/quicksubscription/qmlmqttclient.h 2023-05-16 11:46:45.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.5.2/examples/mqtt/quicksubscription/qmlmqttclient.h 2023-07-07 14:29:57.000000000 +0200 @@ -8,12 +8,15 @@ #include <QtMqtt/QMqttClient> #include <QtMqtt/QMqttSubscription> +#include <QtQml/qqml.h> + class QmlMqttClient; class QmlMqttSubscription : public QObject { Q_OBJECT Q_PROPERTY(QMqttTopicFilter topic MEMBER m_topic NOTIFY topicChanged) + QML_UNCREATABLE("Not intended to be creatable") public: QmlMqttSubscription(QMqttSubscription *s, QmlMqttClient *c); ~QmlMqttSubscription(); @@ -38,6 +41,7 @@ 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) + QML_NAMED_ELEMENT(MqttClient) public: QmlMqttClient(QObject *parent = nullptr); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.5.1/examples/mqtt/quicksubscription/quicksubscription.pro new/qtmqtt-everywhere-src-6.5.2/examples/mqtt/quicksubscription/quicksubscription.pro --- old/qtmqtt-everywhere-src-6.5.1/examples/mqtt/quicksubscription/quicksubscription.pro 2023-05-16 11:46:45.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.5.2/examples/mqtt/quicksubscription/quicksubscription.pro 2023-07-07 14:29:57.000000000 +0200 @@ -1,7 +1,8 @@ TEMPLATE = app +TARGET = quicksubscription QT += qml quick mqtt -CONFIG += c++11 +CONFIG += qmltypes SOURCES += main.cpp \ qmlmqttclient.cpp @@ -9,10 +10,15 @@ HEADERS += \ qmlmqttclient.h -RESOURCES += qml.qrc +qml_resources.files = Main.qml qmldir +qml_resources.prefix = /qt/qml/subscription + +RESOURCES += qml_resources # Additional import path used to resolve QML modules in Qt Creator's code model -QML_IMPORT_PATH = +QML_IMPORT_PATH = $$pwd/. +QML_IMPORT_NAME = subscription +QML_IMPORT_MAJOR_VERSION = 1 # Additional import path used to resolve QML modules just for Qt Quick Designer QML_DESIGNER_IMPORT_PATH = diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.5.1/examples/mqtt/websocketsubscription/websocketiodevice.cpp new/qtmqtt-everywhere-src-6.5.2/examples/mqtt/websocketsubscription/websocketiodevice.cpp --- old/qtmqtt-everywhere-src-6.5.1/examples/mqtt/websocketsubscription/websocketiodevice.cpp 2023-05-16 11:46:45.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.5.2/examples/mqtt/websocketsubscription/websocketiodevice.cpp 2023-07-07 14:29:57.000000000 +0200 @@ -14,10 +14,20 @@ connect(&m_socket, &QWebSocket::binaryMessageReceived, this, &WebSocketIODevice::handleBinaryMessage); } +bool WebSocketIODevice::isSequential() const +{ + return true; +} + +qint64 WebSocketIODevice::bytesAvailable() const +{ + return static_cast<qint64>(m_buffer.size()) + QIODevice::bytesAvailable(); +} + bool WebSocketIODevice::open(QIODevice::OpenMode mode) { QWebSocketHandshakeOptions options; - options.setSubprotocols({m_protocol}); + options.setSubprotocols(QStringList{ QString::fromUtf8(m_protocol) }); m_socket.open(m_url, options); @@ -33,7 +43,7 @@ qint64 WebSocketIODevice::readData(char *data, qint64 maxlen) { qint64 bytesToRead = qMin(maxlen, (qint64)m_buffer.size()); - memcpy(data, m_buffer.constData(), bytesToRead); + memcpy(data, m_buffer.constData(), static_cast<size_t>(bytesToRead)); m_buffer = m_buffer.right(m_buffer.size() - bytesToRead); return bytesToRead; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtmqtt-everywhere-src-6.5.1/examples/mqtt/websocketsubscription/websocketiodevice.h new/qtmqtt-everywhere-src-6.5.2/examples/mqtt/websocketsubscription/websocketiodevice.h --- old/qtmqtt-everywhere-src-6.5.1/examples/mqtt/websocketsubscription/websocketiodevice.h 2023-05-16 11:46:45.000000000 +0200 +++ new/qtmqtt-everywhere-src-6.5.2/examples/mqtt/websocketsubscription/websocketiodevice.h 2023-07-07 14:29:57.000000000 +0200 @@ -13,6 +13,9 @@ public: WebSocketIODevice(QObject *parent = nullptr); + bool isSequential() const override; + qint64 bytesAvailable() const override; + bool open(OpenMode mode) override; void close() override;