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 2024-04-08 17:39:05 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/qt6-remoteobjects (Old) and /work/SRC/openSUSE:Factory/.qt6-remoteobjects.new.1905 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qt6-remoteobjects" Mon Apr 8 17:39:05 2024 rev:22 rq:1165799 version:6.7.0 Changes: -------- --- /work/SRC/openSUSE:Factory/qt6-remoteobjects/qt6-remoteobjects.changes 2024-03-28 14:22:35.587762220 +0100 +++ /work/SRC/openSUSE:Factory/.qt6-remoteobjects.new.1905/qt6-remoteobjects.changes 2024-04-08 17:51:28.923936183 +0200 @@ -1,0 +2,6 @@ +Tue Apr 2 13:39:54 UTC 2024 - Christophe Marin <christo...@krop.fr> + +- Update to 6.7.0: + * https://www.qt.io/blog/qt-6.7-released + +------------------------------------------------------------------- Old: ---- qtremoteobjects-everywhere-src-6.6.3.tar.xz New: ---- qtremoteobjects-everywhere-src-6.7.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ qt6-remoteobjects.spec ++++++ --- /var/tmp/diff_new_pack.WonlQe/_old 2024-04-08 17:51:29.727965858 +0200 +++ /var/tmp/diff_new_pack.WonlQe/_new 2024-04-08 17:51:29.727965858 +0200 @@ -16,8 +16,8 @@ # -%define real_version 6.6.3 -%define short_version 6.6 +%define real_version 6.7.0 +%define short_version 6.7 %define tar_name qtremoteobjects-everywhere-src %define tar_suffix %{nil} # @@ -27,7 +27,7 @@ %endif # Name: qt6-remoteobjects%{?pkg_suffix} -Version: 6.6.3 +Version: 6.7.0 Release: 0 Summary: Qt6 RemoteObjects Library License: LGPL-3.0-only OR (GPL-2.0-only OR GPL-3.0-or-later) ++++++ qtremoteobjects-everywhere-src-6.6.3.tar.xz -> qtremoteobjects-everywhere-src-6.7.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/.cmake.conf new/qtremoteobjects-everywhere-src-6.7.0/.cmake.conf --- old/qtremoteobjects-everywhere-src-6.6.3/.cmake.conf 2024-03-19 00:53:05.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/.cmake.conf 2024-03-22 19:50:53.000000000 +0100 @@ -1,3 +1,5 @@ -set(QT_REPO_MODULE_VERSION "6.6.3") +set(QT_REPO_MODULE_VERSION "6.7.0") set(QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT "alpha1") set(QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_NO_AS_CONST=1") +list(APPEND QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_NO_FOREACH=1") +list(APPEND QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_NO_CONTEXTLESS_CONNECT=1") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/.tag new/qtremoteobjects-everywhere-src-6.7.0/.tag --- old/qtremoteobjects-everywhere-src-6.6.3/.tag 2024-03-19 00:53:05.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/.tag 2024-03-22 19:50:53.000000000 +0100 @@ -1 +1 @@ -d00a983aee9e30a1f0bc8c4e5873a3206857cb54 +6d973e34b5704a2a7c8ebe3db29f95004a1facb1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/coin/axivion/ci_config_linux.json new/qtremoteobjects-everywhere-src-6.7.0/coin/axivion/ci_config_linux.json --- old/qtremoteobjects-everywhere-src-6.6.3/coin/axivion/ci_config_linux.json 2024-03-19 00:53:05.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/coin/axivion/ci_config_linux.json 2024-03-22 19:50:53.000000000 +0100 @@ -1,9 +1,5 @@ { "Project": { - "Git": { - "_active": true, - "sourceserver_gitdir": "/data/axivion/databases/$(env:TESTED_MODULE_COIN).git" - }, "BuildSystemIntegration": { "child_order": [ "GCCSetup", @@ -32,29 +28,14 @@ "build/qml/*/lib*.so*.ir" ], "ir": "build/$(env:TESTED_MODULE_COIN).ir" - }, - "Project-GlobalOptions": { - "directory": "../work/qt/$(env:TESTED_MODULE_COIN)", - "ir": "build/$(env:TESTED_MODULE_COIN).ir", - "name": "qt_$(env:TESTED_MODULE_COIN)_dev_$(env:TARGET_OS_COIN)" - } - }, - "Results": { - "Dashboard": { - "dashboard_url": "https://axivion-srv.ci.qt.io/axivion/" - }, - "Database": { - "ci_mode": { - "directory": "/data/axivion/databases" - } } }, "_Format": "1.0", - "_Version": "trunk-9e0ef9c5818", + "_Version": "7.6.2", "_VersionNum": [ 7, 6, - 9999, - 11489 + 2, + 12725 ] } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/coin/module_config.yaml new/qtremoteobjects-everywhere-src-6.7.0/coin/module_config.yaml --- old/qtremoteobjects-everywhere-src-6.6.3/coin/module_config.yaml 2024-03-19 00:53:05.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/coin/module_config.yaml 2024-03-22 19:50:53.000000000 +0100 @@ -10,3 +10,4 @@ Test: - !include "{{qt/qtbase}}/coin_module_test_template_v3.yaml" + - !include "{{qt/qtbase}}/coin_module_test_docs.yaml" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/dependencies.yaml new/qtremoteobjects-everywhere-src-6.7.0/dependencies.yaml --- old/qtremoteobjects-everywhere-src-6.6.3/dependencies.yaml 2024-03-19 00:53:05.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/dependencies.yaml 2024-03-22 19:50:53.000000000 +0100 @@ -1,7 +1,7 @@ dependencies: ../qtbase: - ref: afdec885058c92e24604f398a926297222da06f3 + ref: 98602c26fc97eb41e3dd7548194ca637420a31b9 required: true ../qtdeclarative: - ref: ab5521fd1a637739c7e91def84caa84426055aff + ref: e6d14fcdc95713f65367499629f93fb1f1e35ec9 required: false diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/examples/remoteobjects/clientapp/doc/src/clientapp.qdoc new/qtremoteobjects-everywhere-src-6.7.0/examples/remoteobjects/clientapp/doc/src/clientapp.qdoc --- old/qtremoteobjects-everywhere-src-6.6.3/examples/remoteobjects/clientapp/doc/src/clientapp.qdoc 2024-03-19 00:53:05.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/examples/remoteobjects/clientapp/doc/src/clientapp.qdoc 2024-03-22 19:50:53.000000000 +0100 @@ -53,7 +53,9 @@ 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 + \quotefromfile clientapp/plugins1.qml + \skipto /^import/ + \printuntil \sa {Time Server Application} */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/examples/remoteobjects/clientapp/plugins1.qml new/qtremoteobjects-everywhere-src-6.7.0/examples/remoteobjects/clientapp/plugins1.qml --- old/qtremoteobjects-everywhere-src-6.6.3/examples/remoteobjects/clientapp/plugins1.qml 2024-03-19 00:53:05.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/examples/remoteobjects/clientapp/plugins1.qml 2024-03-22 19:50:53.000000000 +0100 @@ -1,6 +1,6 @@ // Copyright (C) 2017 Ford Motor Company // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause -//![0] + import QtRemoteObjects import QtQuick import TimeExample // import types from the plugin diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/src/remoteobjects/doc/qtremoteobjects.qdocconf new/qtremoteobjects-everywhere-src-6.7.0/src/remoteobjects/doc/qtremoteobjects.qdocconf --- old/qtremoteobjects-everywhere-src-6.6.3/src/remoteobjects/doc/qtremoteobjects.qdocconf 2024-03-19 00:53:05.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/src/remoteobjects/doc/qtremoteobjects.qdocconf 2024-03-22 19:50:53.000000000 +0100 @@ -59,3 +59,6 @@ navigation.landingpage = "Qt Remote Objects" navigation.cppclassespage = "Qt Remote Objects C++ Classes" navigation.qmltypespage = "Qt Remote Objects QML Types" + +# Enforce zero documentation warnings +warninglimit = 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/src/remoteobjects/doc/src/remoteobjects-repc.qdoc new/qtremoteobjects-everywhere-src-6.7.0/src/remoteobjects/doc/src/remoteobjects-repc.qdoc --- old/qtremoteobjects-everywhere-src-6.6.3/src/remoteobjects/doc/src/remoteobjects-repc.qdoc 2024-03-19 00:53:05.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/src/remoteobjects/doc/src/remoteobjects-repc.qdoc 2024-03-22 19:50:53.000000000 +0100 @@ -64,6 +64,21 @@ }; \endcode + When using the generated header files inside a library, it might be needed + to define class attributes to set the symbol visibility. This can be done + similar to C++ by defining the attribute after the \c class keyword. + In the following example the \c MYSHAREDLIB_EXPORT macro is used, which + is defined in \c "mysharedlib_global.h". See \l{Creating Shared Libraries} + for more information how this works. + + \code + #include "mysharedlib_global.h" + class MYSHAREDLIB_EXPORT MyType + { + ... + }; + \endcode + \section3 PROP Q_PROPERTY elements are created by using the PROP keyword in the rep @@ -324,6 +339,18 @@ The code generated by repc creates a Q_GADGET class for each POD, with corresponding Q_PROPERTY members for each type defined for the POD. + When using the generated header files inside a library, it might be needed + to define class attributes to set the symbol visibility. This can be done + by defining the attribute after the \c POD keyword. + In the following example the \c MYSHAREDLIB_EXPORT macro is used, which + is defined in \c "mysharedlib_global.h". See \l{Creating Shared Libraries} + for more information how this works. + + \code + #include "mysharedlib_global.h" + POD MYSHAREDLIB_EXPORT Foo(int bar) + \endcode + \section2 The ENUM type It is often easier and cleaner to define an ENUM inside a class (see \l ENUM), @@ -354,6 +381,25 @@ end-of-line and adds that to the generated files. So multi-line #if/#else/#endif statements and multi-line macros are not supported. + \section3 #HEADER and #FOOTER Directives + + There are two special directives, \c #HEADER and \c #FOOTER. Those directives + can be used to define content which should be put as-is into the generated + code, either before (HEADER) or after (FOOTER) the interfaces declaration. + The leading \c #HEADER and \c #FOOTER tokens plus one white-space character are + stripped. + + In the following example, the generated repc classes are put inside a namespace. + + \code + #HEADER namespace MyNamespace { + class MyType + { + ... + }; + #FOOTER } // namespace MyNamespace + \endcode + \section1 CMake functions The CMake functions for generating source and replica types are listed below. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/src/remoteobjects/qconnection_local_backend.cpp new/qtremoteobjects-everywhere-src-6.7.0/src/remoteobjects/qconnection_local_backend.cpp --- old/qtremoteobjects-everywhere-src-6.6.3/src/remoteobjects/qconnection_local_backend.cpp 2024-03-19 00:53:05.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/src/remoteobjects/qconnection_local_backend.cpp 2024-03-22 19:50:53.000000000 +0100 @@ -73,6 +73,9 @@ emit shouldReconnect(this); #endif break; + case QLocalSocket::SocketAccessError: + emit setError(QRemoteObjectNode::SocketAccessError); + break; default: break; } @@ -167,6 +170,11 @@ m_server.close(); } +void LocalServerImpl::setSocketOptions(QLocalServer::SocketOptions options) +{ + m_server.setSocketOptions(options); +} + #ifdef Q_OS_LINUX AbstractLocalClientIo::AbstractLocalClientIo(QObject *parent) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/src/remoteobjects/qconnection_local_backend_p.h new/qtremoteobjects-everywhere-src-6.7.0/src/remoteobjects/qconnection_local_backend_p.h --- old/qtremoteobjects-everywhere-src-6.6.3/src/remoteobjects/qconnection_local_backend_p.h 2024-03-19 00:53:05.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/src/remoteobjects/qconnection_local_backend_p.h 2024-03-22 19:50:53.000000000 +0100 @@ -85,6 +85,7 @@ bool listen(const QUrl &address) override; QAbstractSocket::SocketError serverError() const override; void close() override; + void setSocketOptions(QLocalServer::SocketOptions options); protected: QLocalServer m_server; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/src/remoteobjects/qconnection_qnx_qiodevices.h new/qtremoteobjects-everywhere-src-6.7.0/src/remoteobjects/qconnection_qnx_qiodevices.h --- old/qtremoteobjects-everywhere-src-6.6.3/src/remoteobjects/qconnection_qnx_qiodevices.h 2024-03-19 00:53:05.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/src/remoteobjects/qconnection_qnx_qiodevices.h 2024-03-22 19:50:53.000000000 +0100 @@ -73,7 +73,6 @@ private: Q_DISABLE_COPY(QQnxNativeIo) }; -Q_DECLARE_TYPEINFO(QQnxNativeIo, Q_RELOCATABLE_TYPE); class Q_REMOTEOBJECTS_EXPORT QIOQnxSource : public QIODevice { @@ -115,7 +114,6 @@ friend class QQnxNativeServerPrivate; friend class QnxServerIo; }; -Q_DECLARE_TYPEINFO(QIOQnxSource, Q_RELOCATABLE_TYPE); QT_END_NAMESPACE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/src/remoteobjects/qconnectionfactories.cpp new/qtremoteobjects-everywhere-src-6.7.0/src/remoteobjects/qconnectionfactories.cpp --- old/qtremoteobjects-everywhere-src-6.6.3/src/remoteobjects/qconnectionfactories.cpp 2024-03-19 00:53:05.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/src/remoteobjects/qconnectionfactories.cpp 2024-03-22 19:50:53.000000000 +0100 @@ -298,7 +298,7 @@ } /*! - \fn void qRegisterRemoteObjectsClient(const QString &id) + \fn template <typename T> void qRegisterRemoteObjectsClient(const QString &id) \relates QtROClientFactory Registers the Remote Objects client \a id for the type \c{T}. @@ -325,7 +325,7 @@ */ /*! - \fn void qRegisterRemoteObjectsServer(const QString &id) + \fn template <typename T> void qRegisterRemoteObjectsServer(const QString &id) \relates QtROServerFactory Registers the Remote Objects server \a id for the type \c{T}. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/src/remoteobjects/qconnectionfactories.h new/qtremoteobjects-everywhere-src-6.7.0/src/remoteobjects/qconnectionfactories.h --- old/qtremoteobjects-everywhere-src-6.6.3/src/remoteobjects/qconnectionfactories.h 2024-03-19 00:53:05.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/src/remoteobjects/qconnectionfactories.h 2024-03-22 19:50:53.000000000 +0100 @@ -18,7 +18,7 @@ #include <QtNetwork/qabstractsocket.h> #include <QtRemoteObjects/qtremoteobjectglobal.h> - +#include <QtRemoteObjects/qremoteobjectnode.h> QT_BEGIN_NAMESPACE @@ -116,6 +116,7 @@ Q_SIGNALS: void shouldReconnect(QtROClientIoDevice*); + void setError(QRemoteObjectNode::ErrorCode); protected: virtual void doDisconnectFromServer() = 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/src/remoteobjects/qremoteobjectnode.cpp new/qtremoteobjects-everywhere-src-6.7.0/src/remoteobjects/qremoteobjectnode.cpp --- old/qtremoteobjects-everywhere-src-6.6.3/src/remoteobjects/qremoteobjectnode.cpp 2024-03-19 00:53:05.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/src/remoteobjects/qremoteobjectnode.cpp 2024-03-22 19:50:53.000000000 +0100 @@ -44,6 +44,7 @@ static QMutex s_managedTypesMutex; static QHash<int, ManagedGadgetTypeEntry> s_managedTypes; static QHash<int, QSet<QtROIoDeviceBase*>> s_trackedConnections; +static QLocalServer::SocketOptions s_localServerOptions = QLocalServer::NoOptions; static void GadgetsStaticMetacallFunction(QObject *_o, QMetaObject::Call _c, int _id, void **_a) { @@ -746,7 +747,7 @@ // Unregister the type only when the connection is destroyed // Do not unregister types when the connections is discconected, because // if it gets reconnected it will not register the types again - QObject::connect(connection, &QtROIoDeviceBase::destroyed, unregisterIfNotUsed); + QObject::connect(connection, &QtROIoDeviceBase::destroyed, connection, unregisterIfNotUsed); } struct EnumPair { @@ -1192,6 +1193,8 @@ QObject::connect(connection, &QtROIoDeviceBase::readyRead, q, [this, connection]() { onClientRead(connection); }); + connect(connection, &QtROClientIoDevice::setError, this, + &QRemoteObjectNodePrivate::setLastError); connection->connectToServer(); return true; @@ -1676,6 +1679,7 @@ \value HostUrlInvalid The given url has an invalid or unrecognized scheme. \value ProtocolMismatch The client and the server have different protocol versions. \value ListenFailed Can't listen on the specified host port. + \value SocketAccessError The client isn't allowed to connect to the server. Ensure that QRemoteObjectHost::setLocalServerOptions is set appropriately. */ /*! @@ -1696,7 +1700,7 @@ */ /*! - \fn ObjectType *QRemoteObjectNode::acquire(const QString &name) + \fn template <class ObjectType> ObjectType *QRemoteObjectNode::acquire(const QString &name) Returns a pointer to a Replica of type ObjectType (which is a template parameter and must inherit from \l QRemoteObjectReplica). That is, the @@ -1966,6 +1970,13 @@ return false; } remoteObjectIo = new QRemoteObjectSourceIo(hostAddress, q); + QLocalServer::SocketOptions socketOptions; + { + QMutexLocker lock(&s_managedTypesMutex); + socketOptions = s_localServerOptions; + } + if (socketOptions != QLocalServer::NoOptions) + remoteObjectIo->setSocketOptions(socketOptions); if (allowedSchemas == QRemoteObjectHostBase::AllowedSchemas::BuiltInSchemasOnly && !remoteObjectIo->startListening()) { setLastError(QRemoteObjectHostBase::ListenFailed); @@ -1987,6 +1998,26 @@ } /*! + \brief Sets the socket options for QLocalServer backends to \a options. + \since 6.7 + + It must be set before the QRemoteObjectHost object starts listening. + It has no consequence for already listening QRemoteObjectHost + objects or QRemoteObjectHost objects that use different + backends than QLocalServer. QRemoteObjectHost objects start to + listen during construction if the \e address argument is + non-empty, otherwise when the address is set via setHostUrl(). + + \sa setHostUrl(), QRemoteObjectHost() + +*/ +void QRemoteObjectHost::setLocalServerOptions(QLocalServer::SocketOptions options) +{ + QMutexLocker lock(&s_managedTypesMutex); + s_localServerOptions = options; +} + +/*! \qmlproperty url Host::hostUrl The host address for the node. @@ -2320,7 +2351,7 @@ */ /*! - \fn QStringList QRemoteObjectNode::instances() const + \fn template<typename T> QStringList QRemoteObjectNode::instances() const This templated function (taking a \l repc generated type as the template parameter) will return the list of names of every instance of that type on the Remote diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/src/remoteobjects/qremoteobjectnode.h new/qtremoteobjects-everywhere-src-6.7.0/src/remoteobjects/qremoteobjectnode.h --- old/qtremoteobjects-everywhere-src-6.6.3/src/remoteobjects/qremoteobjectnode.h 2024-03-19 00:53:05.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/src/remoteobjects/qremoteobjectnode.h 2024-03-22 19:50:53.000000000 +0100 @@ -6,6 +6,7 @@ #include <QtCore/qsharedpointer.h> #include <QtCore/qmetaobject.h> +#include <QtNetwork/qlocalserver.h> #include <QtRemoteObjects/qtremoteobjectglobal.h> #include <QtRemoteObjects/qremoteobjectregistry.h> #include <QtRemoteObjects/qremoteobjectdynamicreplica.h> @@ -61,7 +62,8 @@ MissingObjectName, HostUrlInvalid, ProtocolMismatch, - ListenFailed + ListenFailed, + SocketAccessError }; Q_ENUM(ErrorCode) @@ -181,6 +183,7 @@ ~QRemoteObjectHost() override; QUrl hostUrl() const override; bool setHostUrl(const QUrl &hostAddress, AllowedSchemas allowedSchemas=BuiltInSchemasOnly) override; + static void setLocalServerOptions(QLocalServer::SocketOptions options); Q_SIGNALS: void hostUrlChanged(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/src/remoteobjects/qremoteobjectreplica.cpp new/qtremoteobjects-everywhere-src-6.7.0/src/remoteobjects/qremoteobjectreplica.cpp --- old/qtremoteobjects-everywhere-src-6.6.3/src/remoteobjects/qremoteobjectreplica.cpp 2024-03-19 00:53:05.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/src/remoteobjects/qremoteobjectreplica.cpp 2024-03-22 19:50:53.000000000 +0100 @@ -769,10 +769,9 @@ } /*! - Returns \c true if this replica has been initialized with data from the - \l {Source} object. Returns \c false otherwise. + Returns the current \l {QRemoteObjectReplica::State}{state} of the replica. - \sa isInitialized() + \sa isInitialized */ QRemoteObjectReplica::State QRemoteObjectReplica::state() const { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/src/remoteobjects/qremoteobjectsourceio.cpp new/qtremoteobjects-everywhere-src-6.7.0/src/remoteobjects/qremoteobjectsourceio.cpp --- old/qtremoteobjects-everywhere-src-6.6.3/src/remoteobjects/qremoteobjectsourceio.cpp 2024-03-19 00:53:05.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/src/remoteobjects/qremoteobjectsourceio.cpp 2024-03-22 19:50:53.000000000 +0100 @@ -8,6 +8,7 @@ #include "qremoteobjectnode_p.h" #include "qremoteobjectpendingcall.h" #include "qtremoteobjectglobal.h" +#include "qconnection_local_backend_p.h" #include <QtCore/qstringlist.h> @@ -86,6 +87,19 @@ return true; } +void QRemoteObjectSourceIo::setSocketOptions(QLocalServer::SocketOptions options) +{ + if (!m_server.isNull()) { + LocalServerImpl *server = qobject_cast<LocalServerImpl *>(m_server.get()); + if (server != nullptr) { + server->setSocketOptions(options); + } else { + qROWarning(this) + << "Attempting to set socket options to a backend that is non-localserver"; + } + } +} + void QRemoteObjectSourceIo::registerSource(QRemoteObjectSourceBase *source) { Q_ASSERT(source); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/src/remoteobjects/qremoteobjectsourceio_p.h new/qtremoteobjects-everywhere-src-6.7.0/src/remoteobjects/qremoteobjectsourceio_p.h --- old/qtremoteobjects-everywhere-src-6.6.3/src/remoteobjects/qremoteobjectsourceio_p.h 2024-03-19 00:53:05.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/src/remoteobjects/qremoteobjectsourceio_p.h 2024-03-22 19:50:53.000000000 +0100 @@ -21,6 +21,7 @@ #include <QtCore/qiodevice.h> #include <QtCore/qscopedpointer.h> +#include <QtNetwork/qlocalserver.h> QT_BEGIN_NAMESPACE @@ -43,6 +44,7 @@ bool enableRemoting(QObject *object, const SourceApiMap *api, QObject *adapter = nullptr); bool disableRemoting(QObject *object); void newConnection(QtROIoDeviceBase *conn); + void setSocketOptions(QLocalServer::SocketOptions options); QUrl serverAddress() const; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/src/remoteobjects/qtremoteobjectglobal.h new/qtremoteobjects-everywhere-src-6.7.0/src/remoteobjects/qtremoteobjectglobal.h --- old/qtremoteobjects-everywhere-src-6.6.3/src/remoteobjects/qtremoteobjectglobal.h 2024-03-19 00:53:05.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/src/remoteobjects/qtremoteobjectglobal.h 2024-03-22 19:50:53.000000000 +0100 @@ -82,7 +82,7 @@ namespace QtRemoteObjects { -Q_NAMESPACE +Q_NAMESPACE_EXPORT(Q_REMOTEOBJECTS_EXPORT) Q_REMOTEOBJECTS_EXPORT void copyStoredProperties(const QMetaObject *mo, const void *src, void *dst); Q_REMOTEOBJECTS_EXPORT void copyStoredProperties(const QMetaObject *mo, const void *src, QDataStream &dst); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/src/remoteobjectsqml/qremoteobjectsqml_p.h new/qtremoteobjects-everywhere-src-6.7.0/src/remoteobjectsqml/qremoteobjectsqml_p.h --- old/qtremoteobjects-everywhere-src-6.6.3/src/remoteobjectsqml/qremoteobjectsqml_p.h 2024-03-19 00:53:05.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/src/remoteobjectsqml/qremoteobjectsqml_p.h 2024-03-22 19:50:53.000000000 +0100 @@ -69,7 +69,7 @@ m_callbacks.insert(watcher, response); // handle timeout - connect(response.timer, &QTimer::timeout, [this, watcher]() { + connect(response.timer, &QTimer::timeout, this, [this, watcher]() { auto i = m_callbacks.find(watcher); if (i == m_callbacks.end()) { qmlWarning(this) << "could not find callback for watcher."; @@ -85,7 +85,7 @@ }); // handle success - connect(watcher, &QRemoteObjectPendingCallWatcher::finished, + connect(watcher, &QRemoteObjectPendingCallWatcher::finished, this, [this](QRemoteObjectPendingCallWatcher *self) { auto i = m_callbacks.find(self); if (i == m_callbacks.end()) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/src/repparser/parser.g new/qtremoteobjects-everywhere-src-6.7.0/src/repparser/parser.g --- old/qtremoteobjects-everywhere-src-6.6.3/src/repparser/parser.g 2024-03-19 00:53:05.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/src/repparser/parser.g 2024-03-22 19:50:53.000000000 +0100 @@ -7,9 +7,9 @@ %token_prefix Token_ %token semicolon "[semicolon];" -%token class "[class]class[ \\t]+(?<name>[A-Za-z_][A-Za-z0-9_]+)[ \\t]*" -%token pod "[pod]POD[ \\t]*(?<name>[A-Za-z_][A-Za-z0-9_]+)[ \\t]*\\((?<types>[^\\)]*)\\);?[ \\t]*" -%token pod2 "[pod2]POD[ \\t]*(?<name>[A-Za-z_][A-Za-z0-9_]+)[ \\t]*" +%token class "[class]class[ \\t]+(?:(?<attribute>[A-Za-z_][A-Za-z0-9_]*)[ \\t]+)?(?<name>[A-Za-z_][A-Za-z0-9_]+)[ \\t]*" +%token pod "[pod]POD[ \\t]*(?:(?<attribute>[A-Za-z_][A-Za-z0-9_]*)[ \\t]+)?(?<name>[A-Za-z_][A-Za-z0-9_]+)[ \\t]*\\((?<types>[^\\)]*)\\);?[ \\t]*" +%token pod2 "[pod2]POD[ \\t]*(?:(?<attribute>[A-Za-z_][A-Za-z0-9_]*)[ \\t]+)?(?<name>[A-Za-z_][A-Za-z0-9_]+)[ \\t]*" %token flag "[flag][ \\t]*FLAG[ \t]*\\([ \t]*(?<name>[A-Za-z_][A-Za-z0-9_]*)[ \t]+(?<enum>[A-Za-z_][A-Za-z0-9_]*)[ \t]*\\)[ \t]*" %token enum "[enum][ \\t]*ENUM[ \t]+(?:(?<class>class[ \t]+))?(?<name>[A-Za-z_][A-Za-z0-9_]*)[ \t]*(?::[ \t]*(?<type>[a-zA-Z0-9 _:]*[a-zA-Z0-9_])[ \t]*)?" %token prop "[prop][ \\t]*PROP[ \\t]*\\((?<args>[^\\)]+)\\);?[ \\t]*" @@ -63,6 +63,7 @@ virtual QString typeName() const; virtual void signature_impl(const AST &ast, QCryptographicHash &checksum) = 0; QString name; + QString compilerAttribute; }; /// A property of a Class declaration @@ -251,6 +252,8 @@ QList<ASTFlag> flags; QList<QString> enumUses; QStringList preprocessorDirectives; + QStringList headerLines; + QStringList footerLines; QHash<QString, QByteArray> typeSignatures; QByteArray typeData(const QString &type, const QString &className) const; QByteArray functionsData(const QList<ASTFunction> &functions, const QString &className) const; @@ -873,7 +876,13 @@ /. case $rule_number: { - m_ast.preprocessorDirectives.append(captured().value(QStringLiteral("preprocessor_directive"))); + const QString line = captured().value(QStringLiteral("preprocessor_directive")); + if (line.startsWith(QStringLiteral("#HEADER"))) + m_ast.headerLines.append(line.sliced(8)); + else if (line.startsWith(QStringLiteral("#FOOTER"))) + m_ast.footerLines.append(line.sliced(8)); + else + m_ast.preprocessorDirectives.append(captured().value(QStringLiteral("preprocessor_directive"))); } break; ./ @@ -884,6 +893,7 @@ { POD pod; pod.name = captured().value(QStringLiteral("name")).trimmed(); + pod.compilerAttribute = captured().value(QStringLiteral("attribute")).trimmed(); const QString argString = captured().value(QLatin1String("types")).trimmed(); if (argString.isEmpty()) { @@ -1301,10 +1311,12 @@ /. case $rule_number: { + const QString attribute = captured().value(QLatin1String("attribute")); const QString name = captured().value(QLatin1String("name")); // new Class declaration m_astClass = ASTClass(name); + m_astClass.compilerAttribute = attribute; } break; ./ @@ -1320,6 +1332,7 @@ // new POD declaration m_astPod = POD(); m_astPod.name = captured().value(QLatin1String("name")).trimmed(); + m_astPod.compilerAttribute = captured().value(QLatin1String("attribute")); m_argString.clear(); } break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/sync.profile new/qtremoteobjects-everywhere-src-6.7.0/sync.profile --- old/qtremoteobjects-everywhere-src-6.6.3/sync.profile 2024-03-19 00:53:05.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/sync.profile 1970-01-01 01:00:00.000000000 +0100 @@ -1,5 +0,0 @@ -%modules = ( # path to module name map - "QtRemoteObjects" => "$basedir/src/remoteobjects", - "QtRemoteObjectsQml" => "$basedir/src/remoteobjectsqml", - "QtRepParser" => "$basedir/src/repparser", -); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/CMakeLists.txt new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/CMakeLists.txt --- old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/CMakeLists.txt 2024-03-19 00:53:05.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/CMakeLists.txt 2024-03-22 19:50:53.000000000 +0100 @@ -13,6 +13,7 @@ endif() add_subdirectory(repc) add_subdirectory(repcodegenerator) +add_subdirectory(repcinlib) add_subdirectory(repparser) add_subdirectory(subclassreplica) if(QT_FEATURE_ssl) @@ -30,3 +31,4 @@ endif() add_subdirectory(localsockettestserver) add_subdirectory(integration) +add_subdirectory(localserveroption) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/benchmarks/tst_benchmarkstest.cpp new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/benchmarks/tst_benchmarkstest.cpp --- old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/benchmarks/tst_benchmarkstest.cpp 2024-03-19 00:53:05.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/benchmarks/tst_benchmarkstest.cpp 2024-03-22 19:50:53.000000000 +0100 @@ -100,7 +100,8 @@ } QEventLoop loop; int lastValue = 0; - connect(center.data(), &LocalDataCenterReplica::data1Changed, [&lastValue, ¢er, &loop]() { + connect(center.data(), &LocalDataCenterReplica::data1Changed, + this, [&lastValue, ¢er, &loop]() { const bool res = (lastValue++ == center->data1()); Q_ASSERT(res); Q_UNUSED(res) @@ -149,7 +150,7 @@ Q_ASSERT(server.hasPendingConnections()); serverSock.reset(server.nextPendingConnection()); int lastValue = 0; - connect(&client, &QLocalSocket::readyRead, [&loop, &lastValue, &client]() { + connect(&client, &QLocalSocket::readyRead, this, [&loop, &lastValue, &client]() { int readout = 0; while (client.bytesAvailable() && lastValue < 50000) { client.read(reinterpret_cast<char*>(&readout), sizeof(int)); @@ -194,7 +195,7 @@ serverSock.reset(server.nextPendingConnection()); QDataStream writeStream(serverSock.data()); int lastValue = 0; - connect(&client, &QIODevice::readyRead, [&loop, &lastValue, &readStream]() { + connect(&client, &QIODevice::readyRead, this, [&loop, &lastValue, &readStream]() { int readout = 0; while (readStream.device()->bytesAvailable() && lastValue < 50000) { readStream >> readout; @@ -229,7 +230,10 @@ QScopedPointer<QAbstractItemModelReplica> model(localClient.acquireModel(QStringLiteral("BenchmarkRemoteModel"))); QEventLoop loop; QHash<int, QPair<QString, QString>> dataToWait; - connect(model.data(), &QAbstractItemModelReplica::dataChanged, [&model, &loop, &dataToWait](const QModelIndex &topLeft, const QModelIndex &bottomRight, const QList<int> &roles) { + connect(model.data(), &QAbstractItemModelReplica::dataChanged, + this, [&model, &loop, &dataToWait](const QModelIndex &topLeft, + const QModelIndex &bottomRight, + const QList<int> &roles) { for (int row = topLeft.row(); row <= bottomRight.row(); ++row) { // we're assuming that the view will try use the sent data, // therefore we're not optimizing the code @@ -276,7 +280,8 @@ } }; - connect(model.data(), &QAbstractItemModelReplica::initialized, [&model, &loop, &beginBenchmark] { + connect(model.data(), &QAbstractItemModelReplica::initialized, + this, [&model, &loop, &beginBenchmark] { if (model->isInitialized()) { beginBenchmark(); } else { @@ -302,7 +307,10 @@ model->setRootCacheSize(5000); // we need to make room for all 5000 rows that we'll use QEventLoop loop; QHash<int, QPair<QString, QString>> dataToWait; - connect(model.data(), &QAbstractItemModelReplica::dataChanged, [&model, &loop, &dataToWait](const QModelIndex &topLeft, const QModelIndex &bottomRight, const QList<int> &roles) { + connect(model.data(), &QAbstractItemModelReplica::dataChanged, this, + [&model, &loop, &dataToWait](const QModelIndex &topLeft, + const QModelIndex &bottomRight, + const QList<int> &roles) { for (int row = topLeft.row(); row <= bottomRight.row(); ++row) { // we're assuming that the view will try use the sent data, // therefore we're not optimizing the code @@ -350,7 +358,8 @@ } }; - connect(model.data(), &QAbstractItemModelReplica::initialized, [&model, &loop, &beginBenchmark] { + connect(model.data(), &QAbstractItemModelReplica::initialized, + this, [&model, &loop, &beginBenchmark] { if (model->isInitialized()) { beginBenchmark(); } else { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/external_IODevice/cert/generate.sh new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/external_IODevice/cert/generate.sh --- old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/external_IODevice/cert/generate.sh 2024-03-19 00:53:05.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/external_IODevice/cert/generate.sh 2024-03-22 19:50:53.000000000 +0100 @@ -16,6 +16,8 @@ # Generate certificate-signing request openssl req -new -key $stem.key -out $stem.csr -subj "/CN=127.0.0.1" # Generate and sign the certificate + # Apple requires that TLS certificates have a validity period of at most 825 days: + # https://support.apple.com/en-us/103769 openssl x509 -req -in $stem.csr -out $stem.crt \ -CA rootCA.pem -CAkey rootCA.key -CAcreateserial -days 825 -sha256 "$@" # Delete the signing request, no longer needed diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/external_IODevice/tst_client/tst_client.cpp new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/external_IODevice/tst_client/tst_client.cpp --- old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/external_IODevice/tst_client/tst_client.cpp 2024-03-19 00:53:05.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/external_IODevice/tst_client/tst_client.cpp 2024-03-22 19:50:53.000000000 +0100 @@ -55,7 +55,7 @@ QVERIFY(pp->waitForSource()); QString pongStr; - connect(pp.data(), &PingPongReplica::pong, [&pongStr](const QString &str) { + connect(pp.data(), &PingPongReplica::pong, this, [&pongStr](const QString &str) { pongStr = str; }); pp->ping("yahoo"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/integration/tst_integration.cpp new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/integration/tst_integration.cpp --- old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/integration/tst_integration.cpp 2024-03-19 00:53:05.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/integration/tst_integration.cpp 2024-03-22 19:50:53.000000000 +0100 @@ -561,7 +561,8 @@ QScopedPointer<QRemoteObjectDynamicReplica> regDynamic, regDynamicNamed; int regAdded = 0; - connect(client->registry(), &QRemoteObjectRegistry::remoteObjectAdded, [&](QRemoteObjectSourceLocation entry) + connect(client->registry(), &QRemoteObjectRegistry::remoteObjectAdded, + this, [&](QRemoteObjectSourceLocation entry) { if (entry.first == QLatin1String("Engine")) { ++regAdded; @@ -788,7 +789,7 @@ QSignalSpy spy(this, &tst_Integration::forwardResult); QScopedPointer<QRemoteObjectDynamicReplica> engine_dr(client->acquireDynamic(QStringLiteral("Engine"))); - connect(engine_dr.data(), &QRemoteObjectDynamicReplica::initialized, [&]() + connect(engine_dr.data(), &QRemoteObjectDynamicReplica::initialized, this, [&]() { const QMetaObject *metaObject = engine_dr->metaObject(); const int propIndex = metaObject->indexOfProperty("rpm"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/integration_external/client/main.cpp new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/integration_external/client/main.cpp --- old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/integration_external/client/main.cpp 2024-03-19 00:53:05.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/integration_external/client/main.cpp 2024-03-22 19:50:53.000000000 +0100 @@ -21,11 +21,11 @@ QRemoteObjectNode::RemoteObjectSchemaHandler setupTcp = [this](QUrl url) { QTcpSocket *socket = new QTcpSocket(&this->m_repNode); connect(socket, &QTcpSocket::connected, - [socket, this]() { + this, [socket, this]() { this->m_repNode.addClientSideConnection(socket); }); connect(socket, &QTcpSocket::errorOccurred, - [socket](QAbstractSocket::SocketError error) { + socket, [socket](QAbstractSocket::SocketError error) { qDebug() << "SocketError" << error; delete socket; }); @@ -139,7 +139,7 @@ rep->testEnumParamsInSlots(MyInterfaceReplica::Second, false, 74); - connect(rep.data(), &MyInterfaceReplica::testEnumParamsInSignals, + connect(rep.data(), &MyInterfaceReplica::testEnumParamsInSignals, this, [](MyInterfaceReplica::Enum1 enumSignalParam) { QCOMPARE(enumSignalParam, MyInterfaceReplica::Second); }); QTRY_COMPARE(rep->enum1(), MyInterfaceReplica::Second); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/integration_external/server/main.cpp new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/integration_external/server/main.cpp --- old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/integration_external/server/main.cpp 2024-03-19 00:53:05.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/integration_external/server/main.cpp 2024-03-22 19:50:53.000000000 +0100 @@ -22,7 +22,7 @@ { tcpServer.listen(QHostAddress(url.host()), quint16(url.port())); QVERIFY(srcNode.waitForRegistry(3000)); - QObject::connect(&tcpServer, &QTcpServer::newConnection, [this]() { + QObject::connect(&tcpServer, &QTcpServer::newConnection, &tcpServer, [this]() { auto conn = this->tcpServer.nextPendingConnection(); this->srcNode.addHostSideConnection(conn); }); @@ -69,7 +69,7 @@ QCOMPARE(waitForStartedSpy.value(0).value(0).toBool(), false); bool next = false; - connect(&myTestServer, &MyTestServer::nextStep, [&next]{ next = true; }); + connect(&myTestServer, &MyTestServer::nextStep, this, [&next] { next = true; }); QTRY_VERIFY_WITH_TIMEOUT(next, 5000); qDebug() << "Disable remoting"; @@ -88,7 +88,7 @@ // wait for quit bool quit = false; - connect(&myTestServer, &MyTestServer::quitApp, [&quit]{quit = true;}); + connect(&myTestServer, &MyTestServer::quitApp, this, [&quit] { quit = true; }); QTRY_VERIFY_WITH_TIMEOUT(quit, 5000); // wait for delivery of events diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/integration_multiprocess/client/main.cpp new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/integration_multiprocess/client/main.cpp --- old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/integration_multiprocess/client/main.cpp 2024-03-19 00:53:05.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/integration_multiprocess/client/main.cpp 2024-03-22 19:50:53.000000000 +0100 @@ -18,8 +18,8 @@ m_repNode.reset(new QRemoteObjectNode); m_repNode->connectToNode(QUrl(QStringLiteral("tcp://127.0.0.1:65213"))); m_rep.reset(m_repNode->acquire<MyInterfaceReplica>()); - connect(m_rep.data(), &MyInterfaceReplica::notified, [&]() { m_notified = true; }); - connect(m_rep.data(), &MyInterfaceReplica::initialValueChanged, [&]() { + connect(m_rep.data(), &MyInterfaceReplica::notified, this, [&]() { m_notified = true; }); + connect(m_rep.data(), &MyInterfaceReplica::initialValueChanged, this, [&]() { // this value is only set when the replica first connects to the source QCOMPARE(m_notified, false); QCOMPARE(m_rep->initialValue(), 18); @@ -128,7 +128,7 @@ rep->testEnumParamsInSlots(MyInterfaceReplica::Second, false, 74); - connect(rep.data(), &MyInterfaceReplica::testEnumParamsInSignals, + connect(rep.data(), &MyInterfaceReplica::testEnumParamsInSignals, this, [](MyInterfaceReplica::Enum1 enumSignalParam) { QCOMPARE(enumSignalParam, MyInterfaceReplica::Second); }); QTRY_COMPARE(rep->enum1(), MyInterfaceReplica::Second); @@ -146,7 +146,7 @@ rep->testExtPODListSlot(list); QSignalSpy spy(rep.data(), &MyInterfaceReplica::testExtPODListSignal); connect(rep.data(), &MyInterfaceReplica::testExtPODListSignal, - [list](const QList<ExtPOD> &l) { QCOMPARE(l, list); }); + this, [list](const QList<ExtPOD> &l) { QCOMPARE(l, list); }); QTRY_COMPARE(spy.size(), 1); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/integration_multiprocess/server/main.cpp new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/integration_multiprocess/server/main.cpp --- old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/integration_multiprocess/server/main.cpp 2024-03-19 00:53:05.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/integration_multiprocess/server/main.cpp 2024-03-22 19:50:53.000000000 +0100 @@ -57,7 +57,7 @@ // wait for quit bool quit = false; - connect(&myTestServer, &MyTestServer::quitApp, [&quit]{quit = true;}); + connect(&myTestServer, &MyTestServer::quitApp, this, [&quit] { quit = true; }); QTRY_VERIFY_WITH_TIMEOUT(quit, 5000); // wait for delivery of events diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/localserveroption/CMakeLists.txt new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/localserveroption/CMakeLists.txt --- old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/localserveroption/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/localserveroption/CMakeLists.txt 2024-03-22 19:50:53.000000000 +0100 @@ -0,0 +1,14 @@ +# Copyright (C) 2023 The Qt Company Ltd. +# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +##################################################################### +## tst_localserveroption Test: +##################################################################### + +qt_internal_add_test(tst_localserveroption + SOURCES + tst_localserveroption.cpp + LIBRARIES + Qt::RemoteObjects + Qt::Core +) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/localserveroption/tst_localserveroption.cpp new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/localserveroption/tst_localserveroption.cpp --- old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/localserveroption/tst_localserveroption.cpp 1970-01-01 01:00:00.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/localserveroption/tst_localserveroption.cpp 2024-03-22 19:50:53.000000000 +0100 @@ -0,0 +1,72 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +#include <QLocalServer> +#include <QRemoteObjectDynamicReplica> +#include <QRemoteObjectHost> +#include <QRemoteObjectNode> +#include <QTest> + +class tst_LocalServerOption : public QObject +{ + Q_OBJECT +private Q_SLOTS: + void testLocalServerOption_data(); + void testLocalServerOption(); +}; + +void tst_LocalServerOption::testLocalServerOption_data() +{ + QTest::addColumn<QLocalServer::SocketOptions>("options"); + QTest::addColumn<bool>("successExpected"); + + QTest::newRow("UserAccessOption") + << QLocalServer::SocketOptions(QLocalServer::UserAccessOption) << true; + QTest::newRow("GroupAccessOption") + << QLocalServer::SocketOptions(QLocalServer::GroupAccessOption) << false; + QTest::newRow("UserAndGroupAccessOption") << QLocalServer::SocketOptions( + QLocalServer::UserAccessOption | QLocalServer::GroupAccessOption) + << true; + QTest::newRow("OtherAccessOption") + << QLocalServer::SocketOptions(QLocalServer::OtherAccessOption) << false; + QTest::newRow("OtherAndGroupAccessOption") << QLocalServer::SocketOptions( + QLocalServer::OtherAccessOption | QLocalServer::GroupAccessOption) + << false; + QTest::newRow("UserAndGroupAndOtherAccessOption") << QLocalServer::SocketOptions( + QLocalServer::UserAccessOption | QLocalServer::GroupAccessOption + | QLocalServer::GroupAccessOption) << true; + QTest::newRow("WorldAccessOption") + << QLocalServer::SocketOptions(QLocalServer::WorldAccessOption) << true; +} + +void tst_LocalServerOption::testLocalServerOption() +{ +#ifdef Q_OS_LINUX + using namespace Qt::Literals; + QFETCH(QLocalServer::SocketOptions, options); + QFETCH(bool, successExpected); + + // Server side setup + std::unique_ptr<QObject> sourceModel = std::make_unique<QObject>(); + QRemoteObjectHost::setLocalServerOptions(options); + QRemoteObjectHost srcNode(QUrl("local:replica"_L1)); + srcNode.enableRemoting(sourceModel.get(), "RemoteModel"_L1); + + // Client side setup + QRemoteObjectNode repNode; + repNode.connectToNode(QUrl("local:replica"_L1)); + std::unique_ptr<QRemoteObjectDynamicReplica> replicaModel( + repNode.acquireDynamic("RemoteModel"_L1)); + + // Verification + QCOMPARE(replicaModel->waitForSource(1000), successExpected); + QCOMPARE(repNode.lastError(), + successExpected ? QRemoteObjectNode::NoError : QRemoteObjectNode::SocketAccessError); +#else + QSKIP("This test is only useful on Linux"); +#endif +} + +QTEST_MAIN(tst_LocalServerOption) + +#include "tst_localserveroption.moc" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/proxy_multiprocess/server/main.cpp new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/proxy_multiprocess/server/main.cpp --- old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/proxy_multiprocess/server/main.cpp 2024-03-19 00:53:05.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/proxy_multiprocess/server/main.cpp 2024-03-22 19:50:53.000000000 +0100 @@ -87,7 +87,7 @@ // wait for quit bool quit = false; - connect(&parent, &MyTestServer::quitApp, [&quit]{quit = true;}); + connect(&parent, &MyTestServer::quitApp, this, [&quit] { quit = true; }); QTRY_VERIFY_WITH_TIMEOUT(quit, 5000); // wait for delivery of events diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/repcinlib/CMakeLists.txt new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/repcinlib/CMakeLists.txt --- old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/repcinlib/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/repcinlib/CMakeLists.txt 2024-03-22 19:50:53.000000000 +0100 @@ -0,0 +1,33 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +qt_add_library(repclib + export_header.h +) + +target_link_libraries(repclib PUBLIC + Qt::RemoteObjects +) +target_compile_definitions(repclib PRIVATE QT_BUILD_REPCLIB_LIB) +set_target_properties(repclib PROPERTIES + C_VISIBILITY_PRESET hidden + CXX_VISIBILITY_PRESET hidden + OBJC_VISIBILITY_PRESET hidden + OBJCXX_VISIBILITY_PRESET hidden + VISIBILITY_INLINES_HIDDEN 1 +) + + +qt6_add_repc_merged(repclib + classwithattributetest.rep +) + +qt_internal_add_test(tst_repcinlib + SOURCES + tst_repcinlib.cpp + LIBRARIES + repclib +) + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/repcinlib/classwithattributetest.rep new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/repcinlib/classwithattributetest.rep --- old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/repcinlib/classwithattributetest.rep 1970-01-01 01:00:00.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/repcinlib/classwithattributetest.rep 2024-03-22 19:50:53.000000000 +0100 @@ -0,0 +1,9 @@ +#include "export_header.h" + +POD Q_REPCLIB_EXPORT MyPod(int number) + +class Q_REPCLIB_EXPORT MyAttributeClass +{ + PROP(bool myProp READONLY) + MODEL tracks(title) +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/repcinlib/export_header.h new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/repcinlib/export_header.h --- old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/repcinlib/export_header.h 1970-01-01 01:00:00.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/repcinlib/export_header.h 2024-03-22 19:50:53.000000000 +0100 @@ -0,0 +1,13 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: BSD-3-Clause + + +#ifndef QT_STATIC +# if defined(QT_BUILD_REPCLIB_LIB) +# define Q_REPCLIB_EXPORT Q_DECL_EXPORT +# else +# define Q_REPCLIB_EXPORT Q_DECL_IMPORT +# endif +#else +# define Q_REPCLIB_EXPORT +#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/repcinlib/tst_repcinlib.cpp new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/repcinlib/tst_repcinlib.cpp --- old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/repcinlib/tst_repcinlib.cpp 1970-01-01 01:00:00.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/repcinlib/tst_repcinlib.cpp 2024-03-22 19:50:53.000000000 +0100 @@ -0,0 +1,25 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +#include "rep_classwithattributetest_merged.h" + +#include <QTest> + +class tst_RepcInLib : public QObject { + Q_OBJECT + +private Q_SLOTS: + void instantiateClassesFromLib(); +}; + +void tst_RepcInLib::instantiateClassesFromLib() +{ + MyPod mypod; + MyAttributeClassSimpleSource source; + MyAttributeClassSourceAPI<MyAttributeClassSimpleSource> sourceAPI(&source); + MyAttributeClassReplica replica; +} + +QTEST_APPLESS_MAIN(tst_RepcInLib) + +#include "tst_repcinlib.moc" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/repcodegenerator/CMakeLists.txt new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/repcodegenerator/CMakeLists.txt --- old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/repcodegenerator/CMakeLists.txt 2024-03-19 00:53:05.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/repcodegenerator/CMakeLists.txt 2024-03-22 19:50:53.000000000 +0100 @@ -16,6 +16,8 @@ classwithsignalonlytest.rep preprocessortest.rep classwithreadonlypropertytest.rep + classwithattributetest.rep + classinnamespace.rep ) ## Scopes: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/repcodegenerator/classinnamespace.rep new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/repcodegenerator/classinnamespace.rep --- old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/repcodegenerator/classinnamespace.rep 1970-01-01 01:00:00.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/repcodegenerator/classinnamespace.rep 2024-03-22 19:50:53.000000000 +0100 @@ -0,0 +1,17 @@ +#HEADER namespace Test { +#HEADER namespace MyNamespace { + +POD MyNamespacePod (int number) + +ENUM MyNamespaceEnum {Value1, Value2} + +class MyNamespaceClass +{ + PROP(bool myProp READONLY) + PROP(Test::MyNamespace::MyNamespaceEnumEnum::MyNamespaceEnum myEnum READONLY) + MODEL tracks(title) + SIGNAL(customSignal(Test::MyNamespace::MyNamespacePod pod)) +} + +#FOOTER } // namespace MyNamespace +#FOOTER } // namespace Test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/repcodegenerator/classwithattributetest.rep new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/repcodegenerator/classwithattributetest.rep --- old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/repcodegenerator/classwithattributetest.rep 1970-01-01 01:00:00.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/repcodegenerator/classwithattributetest.rep 2024-03-22 19:50:53.000000000 +0100 @@ -0,0 +1,7 @@ +ENUM MyEnum {Foo, Bar} + +class Q_DECL_EXPORT MyAttributeClass +{ + PROP(bool myProp READONLY) + MODEL tracks(title) +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/repcodegenerator/tst_repcodegenerator.cpp new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/repcodegenerator/tst_repcodegenerator.cpp --- old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/repcodegenerator/tst_repcodegenerator.cpp 2024-03-19 00:53:05.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/repcodegenerator/tst_repcodegenerator.cpp 2024-03-22 19:50:53.000000000 +0100 @@ -2,6 +2,7 @@ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 #include "rep_preprocessortest_merged.h" +#include "rep_classinnamespace_merged.h" #include <QTest> @@ -10,6 +11,7 @@ private Q_SLOTS: void testPreprocessorTestFile(); + void testNamespaceTestFile(); }; void tst_RepCodeGenerator::testPreprocessorTestFile() @@ -18,6 +20,15 @@ QVERIFY(PREPROCESSORTEST_MACRO); } +void tst_RepCodeGenerator::testNamespaceTestFile() +{ + Test::MyNamespace::MyNamespaceClassReplica testReplica; + Test::MyNamespace::MyNamespaceClassSimpleSource testSource; + Test::MyNamespace::MyNamespacePod testpod; + Test::MyNamespace::MyNamespaceEnumEnum::MyNamespaceEnum testenum = + Test::MyNamespace::MyNamespaceEnumEnum::Value1; +} + QTEST_APPLESS_MAIN(tst_RepCodeGenerator) #include "tst_repcodegenerator.moc" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/repparser/tst_parser.cpp new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/repparser/tst_parser.cpp --- old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/repparser/tst_parser.cpp 2024-03-19 00:53:05.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/repparser/tst_parser.cpp 2024-03-22 19:50:53.000000000 +0100 @@ -26,6 +26,7 @@ void testPods(); void testPods2_data(); void testPods2(); + void testCompilerAttributes(); void testEnums_data(); void testEnums(); void testTypedEnums_data(); @@ -50,6 +51,7 @@ //QTest::newRow("comment") << "//This is a comment"; QTest::newRow("enum") << "ENUM MyEnum {test}"; QTest::newRow("empty class with comment") << "class MyClass {\n//comment\n}"; + QTest::newRow("empty exported class with comment") << "class Q_DECL_EXPORT MyClass {\n//comment\n}"; QTest::newRow("comment, class") << "//comment\nclass MyClass {}"; QTest::newRow("multicomment, class") << "/* row1\n row2\n */\nclass MyClass {}"; QTest::newRow("include, comment, class") << "#include \"foo\"\n//comment\nclass MyClass {}"; @@ -298,6 +300,7 @@ QCOMPARE(ast.pods.size(), 1); const POD pods = ast.pods.first(); + QVERIFY(pods.compilerAttribute.isEmpty()); const QList<PODAttribute> podsList = pods.attributes; const QStringList typeList = expectedtypes.split(QLatin1Char(';')); const QStringList variableList = expectedvariables.split(QLatin1Char(';')); @@ -356,6 +359,7 @@ QCOMPARE(ast.pods.size(), 1); const POD pods = ast.pods.first(); + QVERIFY(pods.compilerAttribute.isEmpty()); const QVector<PODAttribute> podsList = pods.attributes; const QStringList typeList = expectedtypes.split(QLatin1Char(';')); const QStringList variableList = expectedvariables.split(QLatin1Char(';')); @@ -367,6 +371,33 @@ } } +void tst_Parser::testCompilerAttributes() +{ + QTemporaryFile file; + file.open(); + QTextStream stream(&file); + stream << "POD Q_DECL_EXPORT TestPod(int number)" << Qt::endl; + stream << "class Q_DECL_EXPORT TestClass" << Qt::endl; + stream << "{" << Qt::endl; + stream << "};" << Qt::endl; + file.seek(0); + + RepParser parser(file); + QVERIFY(parser.parse()); + + const AST ast = parser.ast(); + + QCOMPARE(ast.pods.size(), 1); + const POD pods = ast.pods.first(); + QCOMPARE(pods.name, "TestPod"); + QCOMPARE(pods.compilerAttribute, "Q_DECL_EXPORT"); + + QCOMPARE(ast.classes.size(), 1); + const ASTClass klass = ast.classes.first(); + QCOMPARE(klass.name, "TestClass"); + QCOMPARE(klass.compilerAttribute, "Q_DECL_EXPORT"); +} + void tst_Parser::testEnums_data() { QTest::addColumn<QString>("enumdeclaration"); @@ -629,6 +660,8 @@ const ASTClass astSub = ast.classes.value(0); const ASTClass astObj = ast.classes.value(1); + QVERIFY(astSub.compilerAttribute.isEmpty()); + QVERIFY(astObj.compilerAttribute.isEmpty()); const ASTProperty property = astObj.properties.at(astObj.subClassPropertyIndices.at(0)); QCOMPARE(property.name, expectedName); QCOMPARE(property.type, expectedType); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/restart/client/main.cpp new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/restart/client/main.cpp --- old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/restart/client/main.cpp 2024-03-19 00:53:05.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/restart/client/main.cpp 2024-03-22 19:50:53.000000000 +0100 @@ -18,7 +18,9 @@ m_repNode.reset(new QRemoteObjectNode); m_repNode->connectToNode(QUrl(QStringLiteral("tcp://127.0.0.1:65217"))); m_rep.reset(m_repNode->acquire<ParentClassReplica>()); - connect(m_rep.data(), &QRemoteObjectReplica::stateChanged, [this](QRemoteObjectReplica::State state, QRemoteObjectReplica::State previousState) { + connect(m_rep.data(), &QRemoteObjectReplica::stateChanged, + this, [this](QRemoteObjectReplica::State state, + QRemoteObjectReplica::State previousState) { qDebug() << "**** stateChanged" << state << previousState; if (state == QRemoteObjectReplica::Suspect) { qWarning() << "Replica suspect"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/restart/server/main.cpp new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/restart/server/main.cpp --- old/qtremoteobjects-everywhere-src-6.6.3/tests/auto/restart/server/main.cpp 2024-03-19 00:53:05.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/tests/auto/restart/server/main.cpp 2024-03-22 19:50:53.000000000 +0100 @@ -52,7 +52,7 @@ // wait for quit bool quit = false; - connect(&myTestServer, &MyTestServer::quitApp, [&quit]{quit = true;}); + connect(&myTestServer, &MyTestServer::quitApp, this, [&quit] { quit = true; }); QTRY_VERIFY_WITH_TIMEOUT(quit, 5000); // wait for delivery of events diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-6.6.3/tools/repc/repcodegenerator.cpp new/qtremoteobjects-everywhere-src-6.7.0/tools/repc/repcodegenerator.cpp --- old/qtremoteobjects-everywhere-src-6.6.3/tools/repc/repcodegenerator.cpp 2024-03-19 00:53:05.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-6.7.0/tools/repc/repcodegenerator.cpp 2024-03-22 19:50:53.000000000 +0100 @@ -136,6 +136,13 @@ } generateHeader(mode); + + m_stream << Qt::endl; + for (const QString &line : m_ast.headerLines) + m_stream << line; + if (!m_ast.headerLines.isEmpty()) + m_stream << Qt::endl; + for (const ASTEnum &en : m_ast.enums) generateEnumGadget(en, QStringLiteral("%1Enum").arg(en.name)); for (const POD &pod : m_ast.pods) @@ -223,6 +230,11 @@ } m_stream << Qt::endl; + for (const QString &line : m_ast.footerLines) + m_stream << line; + if (!m_ast.footerLines.isEmpty()) + m_stream << Qt::endl; + if (!fileName.isEmpty()) m_stream << "#endif // " << fileName << Qt::endl; } @@ -424,9 +436,11 @@ void RepCodeGenerator::generatePOD(const POD &pod) { QStringList equalityCheck; + const QString compilerAttr = (!pod.compilerAttribute.isEmpty() ? + pod.compilerAttribute + QStringLiteral(" ") : QString()); for (const PODAttribute &attr : pod.attributes) equalityCheck << QStringLiteral("left.%1() == right.%1()").arg(attr.name); - m_stream << "class " << pod.name << "\n" + m_stream << "class " << compilerAttr << pod.name << "\n" "{\n" " Q_GADGET\n" << "\n" @@ -569,13 +583,15 @@ const QString className = (astClass.name + (mode == REPLICA ? QStringLiteral("Replica") : mode == SOURCE ? QStringLiteral("Source") : QStringLiteral("SimpleSource"))); + const QString compilerAttr = (!astClass.compilerAttribute.isEmpty() ? + astClass.compilerAttribute + QStringLiteral(" ") : QString()); if (mode == REPLICA) - m_stream << "class " << className << " : public QRemoteObjectReplica" << Qt::endl; + m_stream << "class " << compilerAttr << className << " : public QRemoteObjectReplica" << Qt::endl; else if (mode == SIMPLE_SOURCE) - m_stream << "class " << className << " : public " << astClass.name << "Source" + m_stream << "class " << compilerAttr << className << " : public " << astClass.name << "Source" << Qt::endl; else - m_stream << "class " << className << " : public QObject" << Qt::endl; + m_stream << "class " << compilerAttr << className << " : public QObject" << Qt::endl; m_stream << "{\n"; m_stream << " Q_OBJECT\n";