Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package qt6-remoteobjects for openSUSE:Factory checked in at 2023-10-02 20:05:44 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/qt6-remoteobjects (Old) and /work/SRC/openSUSE:Factory/.qt6-remoteobjects.new.28202 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qt6-remoteobjects" Mon Oct 2 20:05:44 2023 rev:17 rq:1114508 version:6.5.3 Changes: -------- --- /work/SRC/openSUSE:Factory/qt6-remoteobjects/qt6-remoteobjects.changes 2023-07-26 13:23:23.363804166 +0200 +++ /work/SRC/openSUSE:Factory/.qt6-remoteobjects.new.28202/qt6-remoteobjects.changes 2023-10-02 20:07:43.081505139 +0200 @@ -1,0 +2,6 @@ +Thu Sep 28 07:34:19 UTC 2023 - Christophe Marin <christo...@krop.fr> + +- Update to 6.5.3 + * https://www.qt.io/blog/qt-6.5.3-released + +------------------------------------------------------------------- Old: ---- qtremoteobjects-everywhere-src-6.5.2.tar.xz New: ---- qtremoteobjects-everywhere-src-6.5.3.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ qt6-remoteobjects.spec ++++++ --- /var/tmp/diff_new_pack.l5baOW/_old 2023-10-02 20:07:44.133542974 +0200 +++ /var/tmp/diff_new_pack.l5baOW/_new 2023-10-02 20:07:44.137543117 +0200 @@ -16,7 +16,7 @@ # -%define real_version 6.5.2 +%define real_version 6.5.3 %define short_version 6.5 %define tar_name qtremoteobjects-everywhere-src %define tar_suffix %{nil} @@ -27,12 +27,12 @@ %endif # Name: qt6-remoteobjects%{?pkg_suffix} -Version: 6.5.2 +Version: 6.5.3 Release: 0 Summary: Qt6 RemoteObjects Library License: LGPL-3.0-only OR (GPL-2.0-only OR GPL-3.0-or-later) URL: https://www.qt.io -Source: https://www.nic.funet.fi/pub/mirrors/download.qt-project.org/official_releases/qt/%{short_version}/%{real_version}%{tar_suffix}/submodules/%{tar_name}-%{real_version}%{tar_suffix}.tar.xz +Source: https://download.qt.io/official_releases/qt/%{short_version}/%{real_version}%{tar_suffix}/submodules/%{tar_name}-%{real_version}%{tar_suffix}.tar.xz Source99: qt6-remoteobjects-rpmlintrc BuildRequires: pkgconfig BuildRequires: qt6-core-private-devel ++++++ qtremoteobjects-everywhere-src-6.5.2.tar.xz -> qtremoteobjects-everywhere-src-6.5.3.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/.cmake.conf new/qtremoteobjects-everywhere-src-6.5.3/.cmake.conf --- old/qtremoteobjects-everywhere-src-6.5.2/.cmake.conf 2023-07-07 14:29:13.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-6.5.3/.cmake.conf 2023-09-24 11:45:39.000000000 +0200 @@ -1,3 +1,3 @@ -set(QT_REPO_MODULE_VERSION "6.5.2") +set(QT_REPO_MODULE_VERSION "6.5.3") 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/qtremoteobjects-everywhere-src-6.5.2/.tag new/qtremoteobjects-everywhere-src-6.5.3/.tag --- old/qtremoteobjects-everywhere-src-6.5.2/.tag 2023-07-07 14:29:13.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-6.5.3/.tag 2023-09-24 11:45:39.000000000 +0200 @@ -1 +1 @@ -e92b25530982f16443ac839d756153518fbaf1f6 +71ca3bcf8576e7bb44297aef141c8df5085d5214 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/dependencies.yaml new/qtremoteobjects-everywhere-src-6.5.3/dependencies.yaml --- old/qtremoteobjects-everywhere-src-6.5.2/dependencies.yaml 2023-07-07 14:29:13.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-6.5.3/dependencies.yaml 2023-09-24 11:45:39.000000000 +0200 @@ -1,7 +1,7 @@ dependencies: ../qtbase: - ref: af457a9f0f7eb1a2a7d11f495da508faab91a442 + ref: 372eaedc5b8c771c46acc4c96e91bbade4ca3624 required: true ../qtdeclarative: - ref: f289063ff19588a11dd79213632785cfda2909a0 + ref: e00c258fa5a4e122636d441967dea035865fac5d required: false diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/CMakeLists.txt new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/CMakeLists.txt --- old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/CMakeLists.txt 2023-07-07 14:29:13.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/CMakeLists.txt 2023-09-24 11:45:39.000000000 +0200 @@ -2,7 +2,6 @@ # SPDX-License-Identifier: BSD-3-Clause qt_internal_add_example(remoteobjects_server) -qt_internal_add_example(cppclient) add_subdirectory(simpleswitch) add_subdirectory(websockets) if(TARGET Qt::Widgets) @@ -16,6 +15,5 @@ add_subdirectory(ssl) endif() if(TARGET Qt::Quick) - qt_internal_add_example(plugins) qt_internal_add_example(clientapp) endif() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/ble/bleclient/connectpage.h new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/ble/bleclient/connectpage.h --- old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/ble/bleclient/connectpage.h 2023-07-07 14:29:13.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/ble/bleclient/connectpage.h 2023-09-24 11:45:39.000000000 +0200 @@ -13,6 +13,7 @@ class BLEIoDevice; +QT_BEGIN_NAMESPACE class QBluetoothDeviceDiscoveryAgent; class QLowEnergyController; class QLowEnergyService; @@ -20,6 +21,7 @@ namespace Ui { class ConnectPage; } +QT_END_NAMESPACE class ConnectPage : public QWidget { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/ble/bleclient/heaterview.h new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/ble/bleclient/heaterview.h --- old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/ble/bleclient/heaterview.h 2023-07-07 14:29:13.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/ble/bleclient/heaterview.h 2023-09-24 11:45:39.000000000 +0200 @@ -8,12 +8,16 @@ #include <QtRemoteObjects/QRemoteObjectNode> #include <QtWidgets/QWidget> +#include <memory> + class BLEIoDevice; class HeaterReplica; +QT_BEGIN_NAMESPACE namespace Ui { class HeaterView; } +QT_END_NAMESPACE class HeaterView : public QWidget { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/ble/common/bleiodevice.cpp new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/ble/common/bleiodevice.cpp --- old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/ble/common/bleiodevice.cpp 2023-07-07 14:29:13.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/ble/common/bleiodevice.cpp 2023-09-24 11:45:39.000000000 +0200 @@ -5,7 +5,6 @@ #include "bleiodevice.h" #include <QtBluetooth/QLowEnergyController> -#include <QtBluetooth/QLowEnergyService> using namespace Qt::Literals::StringLiterals; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/ble/common/bleiodevice.h new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/ble/common/bleiodevice.h --- old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/ble/common/bleiodevice.h 2023-07-07 14:29:13.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/ble/common/bleiodevice.h 2023-09-24 11:45:39.000000000 +0200 @@ -6,10 +6,11 @@ #include <QtBluetooth/QBluetoothUuid> #include <QtBluetooth/QLowEnergyCharacteristic> +#include <QtBluetooth/QLowEnergyService> + #include <QtCore/QIODevice> #include <QtCore/QPointer> -class QLowEnergyService; class BLEIoDevice : public QIODevice { Q_OBJECT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/ble/doc/src/ble.qdoc new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/ble/doc/src/ble.qdoc --- old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/ble/doc/src/ble.qdoc 2023-07-07 14:29:13.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/ble/doc/src/ble.qdoc 2023-09-24 11:45:39.000000000 +0200 @@ -4,6 +4,7 @@ /*! \example ble \title QtRemoteObjects Bluetooth LE Example + \examplecategory {Connectivity} \brief Using QtBluetooth Low Energy (BT LE or BLE for short) as a transport medium with Qt Remote Objects. \ingroup qtremoteobjects-examples diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/clientapp/CMakeLists.txt new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/clientapp/CMakeLists.txt --- old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/clientapp/CMakeLists.txt 2023-07-07 14:29:13.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/clientapp/CMakeLists.txt 2023-09-24 11:45:39.000000000 +0200 @@ -4,6 +4,7 @@ cmake_minimum_required(VERSION 3.16) project(clientapp LANGUAGES CXX) +set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) if(NOT DEFINED INSTALL_EXAMPLESDIR) @@ -14,16 +15,29 @@ find_package(Qt6 REQUIRED COMPONENTS Core Gui Quick RemoteObjects) +qt_standard_project_setup(REQUIRES 6.5) + qt_add_executable(clientapp + WIN32 + MACOSX_BUNDLE main.cpp ) -set_target_properties(clientapp PROPERTIES - WIN32_EXECUTABLE TRUE - MACOSX_BUNDLE TRUE +qt6_add_qml_module(clientapp + VERSION 1.0 + URI "TimeExample" + SOURCES + plugin.h plugin.cpp + QML_FILES + qml/Clock.qml + RESOURCES + qml/center.png + qml/clock.png + qml/hour.png + qml/minute.png ) -target_link_libraries(clientapp PUBLIC +target_link_libraries(clientapp PRIVATE Qt::Core Qt::Gui Qt::Quick @@ -45,6 +59,10 @@ ${clientapp_resource_files} ) +qt6_add_repc_replicas(clientapp + ../timemodel.rep +) + install(TARGETS clientapp RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/clientapp/clientapp.pro new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/clientapp/clientapp.pro --- old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/clientapp/clientapp.pro 2023-07-07 14:29:13.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/clientapp/clientapp.pro 2023-09-24 11:45:39.000000000 +0200 @@ -1,9 +1,17 @@ -SOURCES += main.cpp +QT += remoteobjects quick -RESOURCES += \ - clientapp.qrc +CONFIG += qmltypes -QT += remoteobjects quick +REPC_REPLICA += $$PWD/../timemodel.rep +TARGET = clientapp + +QML_IMPORT_NAME = TimeExample +QML_IMPORT_MAJOR_VERSION = 1 + +SOURCES += main.cpp plugin.cpp +HEADERS += plugin.h + +RESOURCES += clientapp.qrc contains(QT_CONFIG, c++11): CONFIG += c++11 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/clientapp/clientapp.qrc new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/clientapp/clientapp.qrc --- old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/clientapp/clientapp.qrc 2023-07-07 14:29:13.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/clientapp/clientapp.qrc 2023-09-24 11:45:39.000000000 +0200 @@ -4,5 +4,10 @@ <file>qml/plugins.qml</file> <file>qml/plugins1.qml</file> <file>qml/plugins2.qml</file> + <file>qml/Clock.qml</file> + <file>qml/center.png</file> + <file>qml/clock.png</file> + <file>qml/hour.png</file> + <file>qml/minute.png</file> </qresource> </RCC> Binary files old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/clientapp/doc/images/clientapp-example.webp and new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/clientapp/doc/images/clientapp-example.webp differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/clientapp/doc/src/clientapp.qdoc new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/clientapp/doc/src/clientapp.qdoc --- old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/clientapp/doc/src/clientapp.qdoc 1970-01-01 01:00:00.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/clientapp/doc/src/clientapp.qdoc 2023-09-24 11:45:39.000000000 +0200 @@ -0,0 +1,59 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only + +/*! + \example clientapp + \title Time Client Application + \examplecategory {Connectivity} + \ingroup qtremoteobjects-examples + \meta tag {remoteobjects} + \brief A client who holds a replica of a time object from a server and displays the time in a clock. + + The Time Client Application opens a blue window with a message. When + you click once, it displays a clock. When you click again, two clocks, + then it repeats. The clock is defined in Clock.qml and uses the \c Time + QML-type, implemented in C++, to set the time of the clock using the time + on the server. + + \image clientapp-example.webp + + \section1 Before Running the Time Client Application + + To run this example, \l {Time Server Application} must already be running + on the same host as this application. It sets up a registry server and + hosts an instance of a subclass of the \c MinuteTimerSimpleSource class. + If it is not running, there will be an error message in the window. + + \section1 Defining Remote Objects using a REP-file + + The REP-file "timemodel.rep" in the parent directory of this application + is used to generate the header-files used by both applications. For this + application, the generated "rep_timemodel_replica.h" file defines + \c MinuteTimerReplica, the replica of \c MinuteTimer, and other related + classes. + + \section1 The TimeModel Class + + The \c TimeModel class in plugin.h and plugin.cpp implements the QML-type + \c Time. It contacts the registry server on localhost using the URL + "local:registry", acquires a replica, \c MinuteTimerReplica, and connects + to its signals. The properties are automatically updated. + + \section1 The QML Types + + The QML defined in "Clock.qml" draws a watch using the properties hours + and minutes. + + The application opens a window with the contents "plugins.qml". It changes + between displaying different content using a Loader, cycling for each + click between "plugins0.qml", "plugins1.qml", and "plugins2.qml". + + While "plugins0.qml" displays a blue screen with a message, the custom + QML-type \c Clock is used in "plugins1.qml", with the properties hours + and minutes set to the hour and minute properties of \c Time. The + "plugins2.qml" file is similar but displays two clocks. + + \snippet clientapp/qml/plugins1.qml 0 + + \sa {Time Server Application} +*/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/clientapp/plugin.cpp new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/clientapp/plugin.cpp --- old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/clientapp/plugin.cpp 1970-01-01 01:00:00.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/clientapp/plugin.cpp 2023-09-24 11:45:39.000000000 +0200 @@ -0,0 +1,35 @@ +// Copyright (C) 2017 Ford Motor Company +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +#include "plugin.h" + +// Implements a "TimeModel" class with hour and minute properties +// that change on-the-minute yet efficiently sleep the rest +// of the time. + +TimeModel::TimeModel(QObject *parent) : QObject(parent), m_replica(nullptr) +{ + m_client.setRegistryUrl(QUrl(QStringLiteral("local:registry"))); + m_replica.reset(m_client.acquire<MinuteTimerReplica>()); + connect(m_replica.get(), &MinuteTimerReplica::hourChanged, this, &TimeModel::timeChanged); + connect(m_replica.get(), &MinuteTimerReplica::minuteChanged, this, &TimeModel::timeChanged); + connect(m_replica.get(), &MinuteTimerReplica::timeChanged, this, &TimeModel::timeChanged); + connect(m_replica.get(), &MinuteTimerReplica::stateChanged, this, &TimeModel::isValidChanged); +} + +TimeModel::~TimeModel() { } + +int TimeModel::minute() const +{ + return m_replica->minute(); +} + +int TimeModel::hour() const +{ + return m_replica->hour(); +} + +bool TimeModel::isValid() const +{ + return m_replica->state() == QRemoteObjectReplica::Valid; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/clientapp/plugin.h new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/clientapp/plugin.h --- old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/clientapp/plugin.h 1970-01-01 01:00:00.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/clientapp/plugin.h 2023-09-24 11:45:39.000000000 +0200 @@ -0,0 +1,42 @@ +// Copyright (C) 2017 Ford Motor Company +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +#include <QtQml/QQmlExtensionPlugin> +#include <QtQml/QQmlEngine> +#include <QtQml/qqml.h> +#include <QDebug> +#include <QDateTime> +#include <QBasicTimer> +#include <QCoreApplication> +#include <QRemoteObjectReplica> +#include <QRemoteObjectNode> +#include "rep_timemodel_replica.h" + +// A "TimeModel" class with hour and minute properties +// that change on-the-minute yet efficiently sleep the rest +// of the time. + +class TimeModel : public QObject +{ + Q_OBJECT + Q_PROPERTY(int hour READ hour NOTIFY timeChanged) + Q_PROPERTY(int minute READ minute NOTIFY timeChanged) + Q_PROPERTY(bool isValid READ isValid NOTIFY isValidChanged) + QML_NAMED_ELEMENT(Time) + +public: + TimeModel(QObject *parent = nullptr); + ~TimeModel() override; + + int minute() const; + int hour() const; + bool isValid() const; + +signals: + void timeChanged(); + void isValidChanged(); + +private: + QRemoteObjectNode m_client; + std::unique_ptr<MinuteTimerReplica> m_replica; +}; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/clientapp/qml/Clock.qml new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/clientapp/qml/Clock.qml --- old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/clientapp/qml/Clock.qml 1970-01-01 01:00:00.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/clientapp/qml/Clock.qml 2023-09-24 11:45:39.000000000 +0200 @@ -0,0 +1,57 @@ +// Copyright (C) 2017 Ford Motor Company +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick + +Rectangle { + id: clock + width: 200; height: 200; color: "gray" + + property alias city: cityLabel.text + property variant hours + property variant minutes + property variant shift : 0 + property variant valid : true + + Image { id: background; source: "clock.png" } + + Image { + x: 92.5; y: 27 + source: "hour.png" + transform: Rotation { + id: hourRotation + origin.x: 7.5; origin.y: 73; + angle: (clock.hours * 30) + (clock.minutes * 0.5) + Behavior on angle { + SpringAnimation{ spring: 2; damping: 0.2; modulus: 360 } + } + } + } + + Image { + x: 93.5; y: 17 + source: "minute.png" + transform: Rotation { + id: minuteRotation + origin.x: 6.5; origin.y: 83; + angle: clock.minutes * 6 + Behavior on angle { + SpringAnimation{ spring: 2; damping: 0.2; modulus: 360 } + } + } + } + + Image { + anchors.centerIn: background; source: "center.png" + } + + Text { + id: cityLabel; font.bold: true; font.pixelSize: 14; y:200; color: "white" + anchors.horizontalCenter: parent.horizontalCenter + } + Text { + id: validity; font.bold: true; font.pixelSize: 14; y:100; color: "black" + anchors.horizontalCenter: parent.horizontalCenter + text: clock.valid ? "" : "Server not found" + } +} Binary files old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/clientapp/qml/center.png and new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/clientapp/qml/center.png differ Binary files old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/clientapp/qml/clock.png and new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/clientapp/qml/clock.png differ Binary files old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/clientapp/qml/hour.png and new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/clientapp/qml/hour.png differ Binary files old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/clientapp/qml/minute.png and new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/clientapp/qml/minute.png differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/clientapp/qml/plugins.qml new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/clientapp/qml/plugins.qml --- old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/clientapp/qml/plugins.qml 2023-07-07 14:29:13.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/clientapp/qml/plugins.qml 2023-09-24 11:45:39.000000000 +0200 @@ -1,7 +1,7 @@ // Copyright (C) 2017 Ford Motor Company // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause -import QtQuick 2.0 +import QtQuick Item { width: 200 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/clientapp/qml/plugins0.qml new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/clientapp/qml/plugins0.qml --- old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/clientapp/qml/plugins0.qml 2023-07-07 14:29:13.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/clientapp/qml/plugins0.qml 2023-09-24 11:45:39.000000000 +0200 @@ -1,11 +1,22 @@ // Copyright (C) 2017 Ford Motor Company // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause //![0] -import QtQuick 2.0 +import QtQuick +import TimeExample // import types from the plugin Rectangle { width: 200 height: 400 color: "blue" + + Time { // this class is defined in C++ (plugin.cpp) + id: time + } + + Text { + id: validity; font.bold: true; font.pixelSize: 14; y:200; color: "white" + anchors.horizontalCenter: parent.horizontalCenter + text: time.isValid ? "Click to see clock!" : "Server not found" + } } //![0] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/clientapp/qml/plugins1.qml new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/clientapp/qml/plugins1.qml --- old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/clientapp/qml/plugins1.qml 2023-07-07 14:29:13.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/clientapp/qml/plugins1.qml 2023-09-24 11:45:39.000000000 +0200 @@ -1,14 +1,14 @@ // Copyright (C) 2017 Ford Motor Company // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause //![0] -import QtQuick 2.0 -import TimeExample 1.0 // import types from the plugin +import QtQuick +import TimeExample // import types from the plugin Rectangle { width: 200 height: 400 color: "blue" - Clock { // this class is defined in QML (imports/TimeExample/Clock.qml) + Clock { id: clock1 anchors.top: parent.top Time { // this class is defined in C++ (plugin.cpp) @@ -17,6 +17,7 @@ hours: time.hour minutes: time.minute + valid: time.isValid } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/clientapp/qml/plugins2.qml new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/clientapp/qml/plugins2.qml --- old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/clientapp/qml/plugins2.qml 2023-07-07 14:29:13.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/clientapp/qml/plugins2.qml 2023-09-24 11:45:39.000000000 +0200 @@ -1,13 +1,13 @@ // Copyright (C) 2017 Ford Motor Company // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause //![0] -import QtQuick 2.0 -import TimeExample 1.0 // import types from the plugin +import QtQuick +import TimeExample // import types from the plugin Rectangle { width: 200 height: 400 - Clock { // this class is defined in QML (imports/TimeExample/Clock.qml) + Clock { // this class is defined in QML id: clock1 anchors.top: parent.top Time { // this class is defined in C++ (plugin.cpp) @@ -16,9 +16,10 @@ hours: time.hour minutes: time.minute + valid: time.isValid } - Clock { // this class is defined in QML (imports/TimeExample/Clock.qml) + Clock { // this class is defined in QML id: clock2 anchors.top: clock1.bottom Time { // this class is defined in C++ (plugin.cpp) @@ -27,6 +28,7 @@ hours: time2.hour minutes: time2.minute + valid: time2.isValid } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/clientapp/qmldir new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/clientapp/qmldir --- old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/clientapp/qmldir 1970-01-01 01:00:00.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/clientapp/qmldir 2023-09-24 11:45:39.000000000 +0200 @@ -0,0 +1,3 @@ +module TimeExample +Clock 1.0 Clock.qml +plugin clientapp diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/cppclient/CMakeLists.txt new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/cppclient/CMakeLists.txt --- old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/cppclient/CMakeLists.txt 2023-07-07 14:29:13.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/cppclient/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1,40 +0,0 @@ -# Copyright (C) 2022 The Qt Company Ltd. -# SPDX-License-Identifier: BSD-3-Clause - -cmake_minimum_required(VERSION 3.16) -project(CppClient LANGUAGES CXX) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) -set(CMAKE_AUTOMOC ON) - -if(NOT DEFINED INSTALL_EXAMPLESDIR) - set(INSTALL_EXAMPLESDIR "examples") -endif() - -set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/remoteobjects/cppclient") - -find_package(Qt6 REQUIRED COMPONENTS Core RemoteObjects) - -qt_add_executable(CppClient - main.cpp -) - -set_target_properties(CppClient PROPERTIES - WIN32_EXECUTABLE TRUE - MACOSX_BUNDLE FALSE -) - -target_link_libraries(CppClient PUBLIC - Qt::Core - Qt::RemoteObjects -) - -qt6_add_repc_replicas(CppClient - timemodel.rep -) - -install(TARGETS CppClient - RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" - BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" - LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" -) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/cppclient/cppclient.pro new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/cppclient/cppclient.pro --- old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/cppclient/cppclient.pro 2023-07-07 14:29:13.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/cppclient/cppclient.pro 1970-01-01 01:00:00.000000000 +0100 @@ -1,19 +0,0 @@ -QT += core - -REPC_REPLICA += timemodel.rep -QT += remoteobjects - -QT -= gui - -TARGET = CppClient -CONFIG -= app_bundle - -TEMPLATE = app - -SOURCES += main.cpp - -OTHER_FILES += \ - timemodel.rep - -target.path = $$[QT_INSTALL_EXAMPLES]/remoteobjects/cppclient -INSTALLS += target diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/cppclient/main.cpp new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/cppclient/main.cpp --- old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/cppclient/main.cpp 2023-07-07 14:29:13.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/cppclient/main.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,52 +0,0 @@ -// Copyright (C) 2017 Ford Motor Company -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause - -#include <QCoreApplication> -#include <QTimer> -#include "rep_timemodel_replica.h" - -class tester : public QObject -{ - Q_OBJECT -public: - tester() : QObject(nullptr) - { - QRemoteObjectNode m_client(QUrl(QStringLiteral("local:registry"))); - ptr1.reset(m_client.acquire< MinuteTimerReplica >()); - ptr2.reset(m_client.acquire< MinuteTimerReplica >()); - ptr3.reset(m_client.acquire< MinuteTimerReplica >()); - QTimer::singleShot(0, this, &tester::clear); - QTimer::singleShot(1, this, &tester::clear); - QTimer::singleShot(10000, this, &tester::clear); - QTimer::singleShot(11000, this, &tester::clear); - } -public slots: - void clear() - { - static int i = 0; - if (i == 0) { - i++; - ptr1.reset(); - } else if (i == 1) { - i++; - ptr2.reset(); - } else if (i == 2) { - i++; - ptr3.reset(); - } else { - qApp->quit(); - } - } - -private: - QScopedPointer<MinuteTimerReplica> ptr1, ptr2, ptr3; -}; - -int main(int argc, char *argv[]) -{ - QCoreApplication a(argc, argv); - tester t; - return a.exec(); -} - -#include "main.moc" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/cppclient/timemodel.rep new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/cppclient/timemodel.rep --- old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/cppclient/timemodel.rep 2023-07-07 14:29:13.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/cppclient/timemodel.rep 1970-01-01 01:00:00.000000000 +0100 @@ -1,12 +0,0 @@ -#include <QtCore> - -POD PresetInfo(int presetNumber, float frequency, QString stationName) -class MinuteTimer -{ - PROP(int hour=1); - PROP(int minute=51); - SIGNAL(timeChanged()); - SIGNAL(timeChanged2(QTime t)); - SIGNAL(sendCustom(PresetInfo info)); - SLOT(void SetTimeZone(int zn)); -}; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/modelviewclient/doc/src/modelviewclient.qdoc new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/modelviewclient/doc/src/modelviewclient.qdoc --- old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/modelviewclient/doc/src/modelviewclient.qdoc 2023-07-07 14:29:13.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/modelviewclient/doc/src/modelviewclient.qdoc 2023-09-24 11:45:39.000000000 +0200 @@ -4,6 +4,7 @@ /*! \example modelviewclient \title Model-View Client + \examplecategory {Connectivity} \brief Developing a very simple client program which displays the content and changes made on a server. \ingroup qtremoteobjects-examples diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/modelviewserver/doc/src/modelviewserver.qdoc new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/modelviewserver/doc/src/modelviewserver.qdoc --- old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/modelviewserver/doc/src/modelviewserver.qdoc 2023-07-07 14:29:13.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/modelviewserver/doc/src/modelviewserver.qdoc 2023-09-24 11:45:39.000000000 +0200 @@ -4,6 +4,7 @@ /*! \example modelviewserver \title Model-View Server + \examplecategory {Connectivity} \brief Developing a simple server program that displays and makes changes to a QTreeView which is made available on a Remote Objects network. \ingroup qtremoteobjects-examples diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/plugins/CMakeLists.txt new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/plugins/CMakeLists.txt --- old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/plugins/CMakeLists.txt 2023-07-07 14:29:13.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/plugins/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1,49 +0,0 @@ -# Copyright (C) 2022 The Qt Company Ltd. -# SPDX-License-Identifier: BSD-3-Clause - -cmake_minimum_required(VERSION 3.16) -project(qmlqrotimeexampleplugin LANGUAGES CXX) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) -set(CMAKE_AUTOMOC ON) - -if(NOT DEFINED INSTALL_EXAMPLESDIR) - set(INSTALL_EXAMPLESDIR "examples") -endif() - -set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/remoteobjects/plugins/imports/TimeExample") - -find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml RemoteObjects) - -qt6_add_qml_module(qmlqrotimeexampleplugin - OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/imports/TimeExample" - VERSION 1.0 - URI "TimeExample" - RESOURCE_PREFIX / -) - -target_sources(qmlqrotimeexampleplugin PRIVATE - plugin.cpp -) - -set_target_properties(qmlqrotimeexampleplugin PROPERTIES - WIN32_EXECUTABLE TRUE - MACOSX_BUNDLE TRUE -) - -target_link_libraries(qmlqrotimeexampleplugin PUBLIC - Qt::Core - Qt::Gui - Qt::Qml - Qt::RemoteObjects -) - -qt6_add_repc_replicas(qmlqrotimeexampleplugin - ../timemodel.rep -) - -install(TARGETS qmlqrotimeexampleplugin - RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" - BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" - LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" -) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/plugins/imports/TimeExample/Clock.qml new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/plugins/imports/TimeExample/Clock.qml --- old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/plugins/imports/TimeExample/Clock.qml 2023-07-07 14:29:13.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/plugins/imports/TimeExample/Clock.qml 1970-01-01 01:00:00.000000000 +0100 @@ -1,51 +0,0 @@ -// Copyright (C) 2017 Ford Motor Company -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause - -import QtQuick 2.0 - -Rectangle { - id: clock - width: 200; height: 200; color: "gray" - - property alias city: cityLabel.text - property variant hours - property variant minutes - property variant shift : 0 - - Image { id: background; source: "clock.png" } - - Image { - x: 92.5; y: 27 - source: "hour.png" - transform: Rotation { - id: hourRotation - origin.x: 7.5; origin.y: 73; - angle: (clock.hours * 30) + (clock.minutes * 0.5) - Behavior on angle { - SpringAnimation{ spring: 2; damping: 0.2; modulus: 360 } - } - } - } - - Image { - x: 93.5; y: 17 - source: "minute.png" - transform: Rotation { - id: minuteRotation - origin.x: 6.5; origin.y: 83; - angle: clock.minutes * 6 - Behavior on angle { - SpringAnimation{ spring: 2; damping: 0.2; modulus: 360 } - } - } - } - - Image { - anchors.centerIn: background; source: "center.png" - } - - Text { - id: cityLabel; font.bold: true; font.pixelSize: 14; y:200; color: "white" - anchors.horizontalCenter: parent.horizontalCenter - } -} Binary files old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/plugins/imports/TimeExample/center.png and new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/plugins/imports/TimeExample/center.png differ Binary files old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/plugins/imports/TimeExample/clock.png and new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/plugins/imports/TimeExample/clock.png differ Binary files old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/plugins/imports/TimeExample/hour.png and new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/plugins/imports/TimeExample/hour.png differ Binary files old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/plugins/imports/TimeExample/minute.png and new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/plugins/imports/TimeExample/minute.png differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/plugins/imports/TimeExample/qmldir new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/plugins/imports/TimeExample/qmldir --- old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/plugins/imports/TimeExample/qmldir 2023-07-07 14:29:13.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/plugins/imports/TimeExample/qmldir 1970-01-01 01:00:00.000000000 +0100 @@ -1,3 +0,0 @@ -module TimeExample -Clock 1.0 Clock.qml -plugin qmlqrotimeexampleplugin diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/plugins/plugin.cpp new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/plugins/plugin.cpp --- old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/plugins/plugin.cpp 2023-07-07 14:29:13.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/plugins/plugin.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,92 +0,0 @@ -// Copyright (C) 2017 Ford Motor Company -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause - -#include <QtQml/QQmlExtensionPlugin> -#include <QtQml/QQmlEngine> -#include <QtQml/qqml.h> -#include <QDebug> -#include <QDateTime> -#include <QBasicTimer> -#include <QCoreApplication> -#include <QRemoteObjectReplica> -#include <QRemoteObjectNode> -#include "rep_timemodel_replica.h" - -// Implements a "TimeModel" class with hour and minute properties -// that change on-the-minute yet efficiently sleep the rest -// of the time. - -static QRemoteObjectNode m_client; - -class TimeModel : public QObject -{ - Q_OBJECT - Q_PROPERTY(int hour READ hour NOTIFY timeChanged) - Q_PROPERTY(int minute READ minute NOTIFY timeChanged) - Q_PROPERTY(bool isValid READ isValid NOTIFY isValidChanged) - -public: - TimeModel(QObject *parent = nullptr) : QObject(parent), d_ptr(nullptr) - { - d_ptr.reset(m_client.acquire< MinuteTimerReplica >()); - connect(d_ptr.data(), &MinuteTimerReplica::hourChanged, this, &TimeModel::timeChanged); - connect(d_ptr.data(), &MinuteTimerReplica::minuteChanged, this, &TimeModel::timeChanged); - connect(d_ptr.data(), &MinuteTimerReplica::timeChanged, this, &TimeModel::timeChanged); - connect(d_ptr.data(), &MinuteTimerReplica::timeChanged2, this, &TimeModel::test); - connect(d_ptr.data(), &MinuteTimerReplica::sendCustom, this, &TimeModel::testCustom); - } - - ~TimeModel() override - { - } - - int minute() const { return d_ptr->minute(); } - int hour() const { return d_ptr->hour(); } - bool isValid() const { return d_ptr->state() == QRemoteObjectReplica::Valid; } - -public slots: - //Test a signal with parameters - void test(QTime t) - { - qDebug()<<"Test"<<t; - d_ptr->SetTimeZone(t.minute()); - } - //Test a signal with a custom type - void testCustom(PresetInfo info) - { - qDebug()<<"testCustom"<<info.presetNumber()<<info.frequency()<<info.stationName(); - } - -signals: - void timeChanged(); - void timeChanged2(QTime t); - void sendCustom(PresetInfo info); - void isValidChanged(); - -private: - QScopedPointer<MinuteTimerReplica> d_ptr; -}; - -class QExampleQmlPlugin : public QQmlExtensionPlugin -{ - Q_OBJECT - Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") - -public: - void initializeEngine(QQmlEngine *engine, const char *uri) override - { - Q_UNUSED(engine) - Q_UNUSED(uri) - Q_ASSERT(uri == QLatin1String("TimeExample")); - engine->addImportPath(QStringLiteral("qrc:/qml")); - m_client.setRegistryUrl(QUrl(QStringLiteral("local:registry"))); - } - void registerTypes(const char *uri) override - { - Q_ASSERT(uri == QLatin1String("TimeExample")); - qmlRegisterType<TimeModel>(uri, 1, 0, "Time"); - } - -}; - -#include "plugin.moc" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/plugins/plugins.pro new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/plugins/plugins.pro --- old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/plugins/plugins.pro 2023-07-07 14:29:13.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/plugins/plugins.pro 1970-01-01 01:00:00.000000000 +0100 @@ -1,30 +0,0 @@ -QT += qml remoteobjects - -TEMPLATE = lib -CONFIG += plugin - -REPC_REPLICA += $$PWD/../timemodel.rep - -DESTDIR = imports/TimeExample -TARGET = qmlqrotimeexampleplugin - -SOURCES += plugin.cpp - -pluginfiles.files += \ - imports/TimeExample/qmldir \ - imports/TimeExample/center.png \ - imports/TimeExample/clock.png \ - imports/TimeExample/Clock.qml \ - imports/TimeExample/hour.png \ - imports/TimeExample/minute.png - -qml.files = plugins.qml -qml.path += $$[QT_INSTALL_EXAMPLES]/remoteobjects/plugins -target.path += $$[QT_INSTALL_EXAMPLES]/remoteobjects/plugins/imports/TimeExample -pluginfiles.path += $$[QT_INSTALL_EXAMPLES]/remoteobjects/plugins/imports/TimeExample - -INSTALLS += target qml pluginfiles - -CONFIG += install_ok # Do not cargo-cult this! - -contains(QT_CONFIG, c++11): CONFIG += c++11 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/plugins/plugins.qml new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/plugins/plugins.qml --- old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/plugins/plugins.qml 2023-07-07 14:29:13.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/plugins/plugins.qml 1970-01-01 01:00:00.000000000 +0100 @@ -1,24 +0,0 @@ -// Copyright (C) 2014 Ford Motor Company -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause - -import QtQuick 2.0 - -Item { - width: 200 - height: 400 - property int counter: 0; - MouseArea { - anchors.fill: parent - onClicked: - { - counter = (counter + 1) % 3; - console.log(counter); - pageLoader.source = "plugins"+counter+".qml" - } - } - Loader { - id: pageLoader - source: "plugins0.qml" - } -} -//![0] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/plugins/plugins0.qml new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/plugins/plugins0.qml --- old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/plugins/plugins0.qml 2023-07-07 14:29:13.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/plugins/plugins0.qml 1970-01-01 01:00:00.000000000 +0100 @@ -1,11 +0,0 @@ -// Copyright (C) 2017 Ford Motor Company -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause -//![0] -import QtQuick 2.0 - -Rectangle { - width: 200 - height: 400 - color: "blue" -} -//![0] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/plugins/plugins1.qml new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/plugins/plugins1.qml --- old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/plugins/plugins1.qml 2023-07-07 14:29:13.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/plugins/plugins1.qml 1970-01-01 01:00:00.000000000 +0100 @@ -1,23 +0,0 @@ -// Copyright (C) 2017 Ford Motor Company -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause -//![0] -import QtQuick 2.0 -import TimeExample 1.0 // import types from the plugin - -Rectangle { - width: 200 - height: 400 - color: "blue" - Clock { // this class is defined in QML (imports/TimeExample/Clock.qml) - id: clock1 - anchors.top: parent.top - Time { // this class is defined in C++ (plugin.cpp) - id: time - } - - hours: time.hour - minutes: time.minute - - } -} -//![0] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/plugins/plugins2.qml new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/plugins/plugins2.qml --- old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/plugins/plugins2.qml 2023-07-07 14:29:13.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/plugins/plugins2.qml 1970-01-01 01:00:00.000000000 +0100 @@ -1,34 +0,0 @@ -// Copyright (C) 2017 Ford Motor Company -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause -//![0] -import QtQuick 2.0 -import TimeExample 1.0 // import types from the plugin - -Rectangle { - width: 200 - height: 400 - Clock { // this class is defined in QML (imports/TimeExample/Clock.qml) - id: clock1 - anchors.top: parent.top - Time { // this class is defined in C++ (plugin.cpp) - id: time - } - - hours: time.hour - minutes: time.minute - - } - Clock { // this class is defined in QML (imports/TimeExample/Clock.qml) - id: clock2 - anchors.top: clock1.bottom - Time { // this class is defined in C++ (plugin.cpp) - id: time2 - } - - hours: time2.hour - minutes: time2.minute - - } - -} -//![0] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/remoteobjects.pro new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/remoteobjects.pro --- old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/remoteobjects.pro 2023-07-07 14:29:13.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/remoteobjects.pro 2023-09-24 11:45:39.000000000 +0200 @@ -2,7 +2,6 @@ CONFIG += debug_and_release ordered SUBDIRS = \ remoteobjects_server \ - cppclient \ simpleswitch \ websockets @@ -17,7 +16,6 @@ qtHaveModule(quick) { SUBDIRS += \ - plugins \ clientapp } Binary files old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/remoteobjects_server/doc/images/remoteobjects-server-example.webp and new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/remoteobjects_server/doc/images/remoteobjects-server-example.webp differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/remoteobjects_server/doc/src/remoteobjects_server.qdoc new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/remoteobjects_server/doc/src/remoteobjects_server.qdoc --- old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/remoteobjects_server/doc/src/remoteobjects_server.qdoc 1970-01-01 01:00:00.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/remoteobjects_server/doc/src/remoteobjects_server.qdoc 2023-09-24 11:45:39.000000000 +0200 @@ -0,0 +1,45 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only + +/*! + \example remoteobjects_server + \title Time Server Application + \examplecategory {Connectivity} + \ingroup qtremoteobjects-examples + \meta tag {remoteobjects} + \brief A server which shares a time object with connected clients. + + The Time Server Application instantiates a \c MinuteTimer object and + shares it with all connected \l {Time Client Application} + {Time Client Applications}. + + \image remoteobjects-server-example.webp + + \section1 Defining Remote Objects using a REP-file + + The REP-file "timemodel.rep" in the parent directory of the example + is used to generate the header-files used by both applications. + For this application, the generated "rep_timemodel_source.h" file + defines \c MinuteTimerSource, the the class to subclass for the + implementation of \c MinuteTimer, and other related classes. + + \section1 The TimeModel Class + + The \c TimeModel class in timemodel.h and timemodel.cpp implements the + time object to share. It uses a \c QBasicTimer to ensure that the + time is updated by calling the \c timerEvent member function. + + \snippet remoteobjects_server/timemodel.cpp 0 + + \section1 Sharing an Instance of TimeModel + + Instances of \c QRemoteObjectHost and a \c QRemoteObjectRegistryHost are + created to host an object and having a registry to find it. A + \c MinuteTimer object is then created and it is shared using the + \c enableRemoting member function of the \c QRemoteObjectRegistryHost + object. + + \snippet remoteobjects_server/main.cpp 0 + + \sa {Time Client Application} +*/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/remoteobjects_server/main.cpp new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/remoteobjects_server/main.cpp --- old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/remoteobjects_server/main.cpp 2023-07-07 14:29:13.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/remoteobjects_server/main.cpp 2023-09-24 11:45:39.000000000 +0200 @@ -38,6 +38,7 @@ } #endif +//![0] int main(int argc, char *argv[]) { QCoreApplication app(argc, argv); @@ -55,3 +56,4 @@ Q_UNUSED(timer) return app.exec(); } +//![0] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/remoteobjects_server/timemodel.cpp new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/remoteobjects_server/timemodel.cpp --- old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/remoteobjects_server/timemodel.cpp 2023-07-07 14:29:13.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/remoteobjects_server/timemodel.cpp 2023-09-24 11:45:39.000000000 +0200 @@ -10,10 +10,13 @@ setMinute(time.minute()); timer.start(60000-time.second()*1000, this); } + MinuteTimer::~MinuteTimer() { timer.stop(); } + +//![0] void MinuteTimer::timerEvent(QTimerEvent *) { QTime now = QTime::currentTime(); @@ -29,10 +32,9 @@ setHour(time.hour()); setMinute(time.minute()); emit timeChanged(); - emit timeChanged2(time); - static PresetInfo bla(3, 93.9f, "Best Station"); - emit sendCustom(bla); } +//![0] + void MinuteTimer::SetTimeZone(const int &zn) { qDebug()<<"SetTimeZone"<<zn; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/ssl/doc/src/ssl.qdoc new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/ssl/doc/src/ssl.qdoc --- old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/ssl/doc/src/ssl.qdoc 2023-07-07 14:29:13.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/ssl/doc/src/ssl.qdoc 2023-09-24 11:45:39.000000000 +0200 @@ -5,7 +5,7 @@ \example ssl \title SSL Server and Client \brief Setting up a secure Remote Object network using QSslSockets. - \examplecategory {Input/Output} + \examplecategory {Connectivity} \meta tag {rpc,network,tls} \ingroup qtremoteobjects-examples diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/websockets/common/websocketiodevice.cpp new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/websockets/common/websocketiodevice.cpp --- old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/websockets/common/websocketiodevice.cpp 2023-07-07 14:29:13.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/websockets/common/websocketiodevice.cpp 2023-09-24 11:45:39.000000000 +0200 @@ -3,8 +3,6 @@ #include "websocketiodevice.h" -#include <QWebSocket> - WebSocketIoDevice::WebSocketIoDevice(QWebSocket *webSocket, QObject *parent) : QIODevice(parent) , m_socket(webSocket) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/websockets/common/websocketiodevice.h new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/websockets/common/websocketiodevice.h --- old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/websockets/common/websocketiodevice.h 2023-07-07 14:29:13.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/websockets/common/websocketiodevice.h 2023-09-24 11:45:39.000000000 +0200 @@ -7,8 +7,7 @@ #include <QBuffer> #include <QIODevice> #include <QPointer> - -class QWebSocket; +#include <QWebSocket> class WebSocketIoDevice : public QIODevice { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/websockets/doc/src/websocket.qdoc new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/websockets/doc/src/websocket.qdoc --- old/qtremoteobjects-everywhere-src-6.5.2/examples/remoteobjects/websockets/doc/src/websocket.qdoc 2023-07-07 14:29:13.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-6.5.3/examples/remoteobjects/websockets/doc/src/websocket.qdoc 2023-09-24 11:45:39.000000000 +0200 @@ -5,7 +5,7 @@ \example websockets \title QtRemoteObjects WebSockets Applications \brief Using a non-QIODevice-based transport (QWebSocket) with QtRemoteObjects. - \examplecategory {Input/Output} + \examplecategory {Connectivity} \meta tag {rpc,network,websockets} \ingroup qtremoteobjects-examples diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/src/remoteobjects/doc/snippets/doc_src_simpleswitch.cpp new/qtremoteobjects-everywhere-src-6.5.3/src/remoteobjects/doc/snippets/doc_src_simpleswitch.cpp --- old/qtremoteobjects-everywhere-src-6.5.2/src/remoteobjects/doc/snippets/doc_src_simpleswitch.cpp 2023-07-07 14:29:13.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-6.5.3/src/remoteobjects/doc/snippets/doc_src_simpleswitch.cpp 2023-09-24 11:45:39.000000000 +0200 @@ -29,7 +29,7 @@ public: SimpleSwitch(QObject *parent = nullptr); ~SimpleSwitch(); - virtual void server_slot(bool clientState); + void server_slot(bool clientState) override; public Q_SLOTS: void timeout_slot(); private: @@ -75,7 +75,7 @@ //! [simpleSwitch_serversource_example1] //! [simpleSwitch_serverhostnode_example1] -QRemoteObjectHost srcNode(QUrl(QStringLiteral("local:switch"))); +QRemoteObjectHost srcNode(QUrl(QStringLiteral("local:replica"))); //! [simpleSwitch_serverhostnode_example1] //! [simpleSwitch_enableremoting_example1] @@ -93,7 +93,8 @@ SimpleSwitch srcSwitch; // create simple switch - QRemoteObjectHost srcNode(QUrl(QStringLiteral("local:switch"))); // create host node without Registry + // Create host node without Registry: + QRemoteObjectHost srcNode(QUrl(QStringLiteral("local:replica"))); srcNode.enableRemoting(&srcSwitch); // enable remoting/sharing return a.exec(); @@ -106,8 +107,8 @@ //! [simpleSwitch_clientremotenode_example1] QRemoteObjectNode repNode; // create remote object node -repNode.connectToNode(QUrl(QStringLiteral("local:switch"))); // connect with remote host node - //! [simpleSwitch_clientremotenode_example1] +repNode.connectToNode(QUrl(QStringLiteral("local:replica"))); // connect with remote host node +//! [simpleSwitch_clientremotenode_example1] //! [simpleSwitch_clientacquirereplica_example1] QSharedPointer<SimpleSwitchReplica> ptr; @@ -128,14 +129,14 @@ Q_OBJECT public: Client(QSharedPointer<SimpleSwitchReplica> ptr); - ~Client(); + ~Client() override = default; void initConnections();// Function to connect signals and slots of source and client Q_SIGNALS: void echoSwitchState(bool switchState);// this signal is connected with server_slot(..) on the source object and echoes back switch state received from source public Q_SLOTS: - void recSwitchState_slot(); // slot to receive source state + void recSwitchState_slot(bool); // slot to receive source state private: bool clientSwitchState; // holds received server switch state QSharedPointer<SimpleSwitchReplica> reptr;// holds reference to replica @@ -152,14 +153,10 @@ Client::Client(QSharedPointer<SimpleSwitchReplica> ptr) : QObject(nullptr),reptr(ptr) { + // Connect signal for replica initialized with initialization slot. initConnections(); - //We can connect to SimpleSwitchReplica Signals/Slots - //directly because our Replica was generated by repc. -} - -//destructor -Client::~Client() -{ + // We can connect to SimpleSwitchReplica Signals/Slots + // directly because our Replica was generated by repc. } void Client::initConnections() @@ -192,7 +189,7 @@ QSharedPointer<SimpleSwitchReplica> ptr; // shared pointer to hold source replica QRemoteObjectNode repNode; // create remote object node - repNode.connectToNode(QUrl(QStringLiteral("local:switch"))); // connect with remote host node + repNode.connectToNode(QUrl(QStringLiteral("local:replica"))); // connect with remote host node ptr.reset(repNode.acquire<SimpleSwitchReplica>()); // acquire replica of source from host node @@ -204,7 +201,7 @@ //! [simpleSwitch_dynamicclientnode_example2] QRemoteObjectNode repNode; // create remote object node -repNode.connectToNode(QUrl(QStringLiteral("local:switch"))); // connect with remote host node +repNode.connectToNode(QUrl(QStringLiteral("local:replica"))); // connect with remote host node //! [simpleSwitch_dynamicclientnode_example2] //! [simpleSwitch_dynamicclientacquirereplica_example2] @@ -227,14 +224,14 @@ Q_OBJECT public: DynamicClient(QSharedPointer<QRemoteObjectDynamicReplica> ptr); - ~DynamicClient(); + ~DynamicClient() override = default; Q_SIGNALS: void echoSwitchState(bool switchState);// this signal is connected with server_slot(..) slot of source object and echoes back switch state received from source public Q_SLOTS: - void recSwitchState_slot(); // Slot to receive source state - void initConnection_slot(); //Slot to connect signals/slot on replica initialization + void recSwitchState_slot(bool); // Slot to receive source state + void initConnection_slot(); // Slot to connect signals/slot on replica initialization private: bool clientSwitchState; // holds received server switch state @@ -248,35 +245,33 @@ #include "dynamicclient.h" // constructor -DynamicClient::DynamicClient(QSharedPointer<QRemoteObjectDynamicReplica> ptr) : - QObject(nullptr), reptr(ptr) +DynamicClient::DynamicClient(QSharedPointer<QRemoteObjectDynamicReplica> ptr) + : QObject(nullptr), clientSwitchState(false), reptr(ptr) { - //connect signal for replica valid changed with signal slot initialization QObject::connect(reptr.data(), &QRemoteObjectDynamicReplica::initialized, this, &DynamicClient::initConnection_slot); } -//destructor -DynamicClient::~DynamicClient() -{ -} - // Function to initialize connections between slots and signals void DynamicClient::initConnection_slot() { - - // connect source replica signal currStateChanged() with client's recSwitchState() slot to receive source's current state - QObject::connect(reptr.data(), SIGNAL(currStateChanged()), this, SLOT(recSwitchState_slot())); - // connect client's echoSwitchState(..) signal with replica's server_slot(..) to echo back received state - QObject::connect(this, SIGNAL(echoSwitchState(bool)),reptr.data(), SLOT(server_slot(bool))); -} - -void DynamicClient::recSwitchState_slot() -{ - clientSwitchState = reptr->property("currState").toBool(); // use replica property to get currState from source - qDebug() << "Received source state " << clientSwitchState; - Q_EMIT echoSwitchState(clientSwitchState); // Emit signal to echo received state back to server + // Connect source replica signal currStateChanged() with client's + // recSwitchState() slot to receive source's current state: + QObject::connect(reptr.data(), SIGNAL(currStateChanged(bool)), this, + SLOT(recSwitchState_slot(bool))); + // Connect client's echoSwitchState(..) signal with replica's + // server_slot(..) to echo back received state: + QObject::connect(this, SIGNAL(echoSwitchState(bool)), reptr.data(), SLOT(server_slot(bool))); +} + +void DynamicClient::recSwitchState_slot(bool value) +{ + // Use replica property to get "currState" from source: + clientSwitchState = reptr->property("currState").toBool(); + qDebug() << "Received source state " << value << clientSwitchState; + // Emit signal to echo received state back to server: + Q_EMIT echoSwitchState(clientSwitchState); } //! [simpleSwitch_dynamicclientcpp_example2] @@ -293,11 +288,13 @@ QSharedPointer<QRemoteObjectDynamicReplica> ptr; // shared pointer to hold replica QRemoteObjectNode repNode; - repNode.connectToNode(QUrl(QStringLiteral("local:switch"))); + repNode.connectToNode(QUrl(QStringLiteral("local:replica"))); ptr.reset(repNode.acquireDynamic("SimpleSwitch")); // acquire replica of source from host node DynamicClient rswitch(ptr); // create client switch object and pass replica reference to it + + return a.exec(); } //! [simpleSwitch_dynamicclientmaincpp_example2] @@ -311,10 +308,14 @@ SimpleSwitch srcSwitch; // create SimpleSwitch - QRemoteObjectRegistryHost regNode(QUrl(QStringLiteral("local:registry"))); // create node that hosts registry - QRemoteObjectHost srcNode(QUrl(QStringLiteral("local:switch")), QUrl(QStringLiteral("local:registry"))); // create node that will host source and connect to registry - //Note, you can add srcSwitch directly to regNode if desired. - //We use two Nodes here, as the regNode could easily be in a third process. + // Create node that hosts registry: + QRemoteObjectRegistryHost regNode(QUrl(QStringLiteral("local:registry"))); + + // Create node that will host source and connect to registry: + QRemoteObjectHost srcNode(QUrl(QStringLiteral("local:replica")), + QUrl(QStringLiteral("local:registry"))); + // Note, you can add srcSwitch directly to regNode if desired. + // We use two Nodes here, as the regNode could easily be in a third process. srcNode.enableRemoting(&srcSwitch); // enable remoting of source object diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/src/remoteobjects/doc/src/remoteobjects-examples.qdoc new/qtremoteobjects-everywhere-src-6.5.3/src/remoteobjects/doc/src/remoteobjects-examples.qdoc --- old/qtremoteobjects-everywhere-src-6.5.2/src/remoteobjects/doc/src/remoteobjects-examples.qdoc 2023-07-07 14:29:13.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-6.5.3/src/remoteobjects/doc/src/remoteobjects-examples.qdoc 2023-09-24 11:45:39.000000000 +0200 @@ -5,7 +5,6 @@ \group qtremoteobjects-examples \title Qt Remote Objects Examples \brief Examples for the Qt Remote Objects module - \ingroup all-examples \ingroup qtremoteobjects The list of \l {Qt Remote Objects} examples. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.5.2/src/remoteobjects/qremoteobjectregistry.cpp new/qtremoteobjects-everywhere-src-6.5.3/src/remoteobjects/qremoteobjectregistry.cpp --- old/qtremoteobjects-everywhere-src-6.5.2/src/remoteobjects/qremoteobjectregistry.cpp 2023-07-07 14:29:13.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-6.5.3/src/remoteobjects/qremoteobjectregistry.cpp 2023-09-24 11:45:39.000000000 +0200 @@ -52,7 +52,8 @@ This signal is emitted whenever a new source location is added to the registry. - \a entry is a QRemoteObjectSourceLocation, a typedef for QPair<QString, QUrl>. + \a entry is a QRemoteObjectSourceLocation, a typedef for + QPair<QString, QRemoteObjectSourceLocationInfo>. \sa remoteObjectRemoved() */ @@ -62,7 +63,8 @@ This signal is emitted whenever a Source location is removed from the Registry. - \a entry is a QRemoteObjectSourceLocation, a typedef for QPair<QString, QUrl>. + \a entry is a QRemoteObjectSourceLocation, a typedef for + QPair<QString, QRemoteObjectSourceLocationInfo>. \sa remoteObjectAdded() */ @@ -72,8 +74,9 @@ \brief The set of sources known to the registry. This property is a QRemoteObjectSourceLocations, which is a typedef for - QHash<QString, QUrl>. Each known \l Source is the QString key, while the - url for the host node is the corresponding value for that key in the hash. + QHash<QString, QRemoteObjectSourceLocationInfo>. Each known \l Source is + contained as a QString key in the hash, and the corresponding value for + that key is the QRemoteObjectSourceLocationInfo for the host node. */ /*!