Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libqt5-qtremoteobjects for openSUSE:Factory checked in at 2023-01-11 14:34:39 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libqt5-qtremoteobjects (Old) and /work/SRC/openSUSE:Factory/.libqt5-qtremoteobjects.new.32243 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libqt5-qtremoteobjects" Wed Jan 11 14:34:39 2023 rev:24 rq:1057236 version:5.15.8+kde0 Changes: -------- --- /work/SRC/openSUSE:Factory/libqt5-qtremoteobjects/libqt5-qtremoteobjects.changes 2022-11-04 17:36:08.821180986 +0100 +++ /work/SRC/openSUSE:Factory/.libqt5-qtremoteobjects.new.32243/libqt5-qtremoteobjects.changes 2023-01-11 14:36:12.533622455 +0100 @@ -1,0 +2,7 @@ +Mon Jan 9 09:23:07 UTC 2023 - Fabian Vogt <fab...@ritter-vogt.de> + +- Update to version 5.15.8+kde0, rebased upstream: + * Fix reconnect to replaced server node + * Fix header change replication + +------------------------------------------------------------------- Old: ---- qtremoteobjects-everywhere-src-5.15.7+kde0.obscpio New: ---- qtremoteobjects-everywhere-src-5.15.8+kde0.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libqt5-qtremoteobjects.spec ++++++ --- /var/tmp/diff_new_pack.tuhV9v/_old 2023-01-11 14:36:13.753629352 +0100 +++ /var/tmp/diff_new_pack.tuhV9v/_new 2023-01-11 14:36:13.757629373 +0100 @@ -19,11 +19,11 @@ %define qt5_snapshot 1 %define libname libQt5RemoteObjects5 %define base_name libqt5 -%define real_version 5.15.7 -%define so_version 5.15.7 +%define real_version 5.15.8 +%define so_version 5.15.8 %define tar_version qtremoteobjects-everywhere-src-%{version} Name: libqt5-qtremoteobjects -Version: 5.15.7+kde0 +Version: 5.15.8+kde0 Release: 0 Summary: Qt 5 RemoteObjects Library License: LGPL-3.0-only OR (GPL-2.0-only OR GPL-3.0-or-later) ++++++ _service ++++++ --- /var/tmp/diff_new_pack.tuhV9v/_old 2023-01-11 14:36:13.801629623 +0100 +++ /var/tmp/diff_new_pack.tuhV9v/_new 2023-01-11 14:36:13.805629645 +0100 @@ -1,12 +1,12 @@ <services> <service name="obs_scm" mode="disabled"> <param name="changesgenerate">enable</param> - <param name="versionformat">5.15.7+kde@TAG_OFFSET@</param> + <param name="versionformat">5.15.8+kde@TAG_OFFSET@</param> <param name="url">https://invent.kde.org/qt/qt/qtremoteobjects.git</param> <param name="scm">git</param> <param name="filename">qtremoteobjects-everywhere-src</param> <param name="revision">kde/5.15</param> - <param name="parent-tag">v5.15.7-lts-lgpl</param> + <param name="parent-tag">v5.15.8-lts-lgpl</param> <param name="changesgenerate">enable</param> </service> <service name="set_version" mode="disabled"/> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.tuhV9v/_old 2023-01-11 14:36:13.825629758 +0100 +++ /var/tmp/diff_new_pack.tuhV9v/_new 2023-01-11 14:36:13.829629781 +0100 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://invent.kde.org/qt/qt/qtremoteobjects.git</param> - <param name="changesrevision">4d6d1e35fb8e0cb900b5e5e9266edea51dc4f735</param></service></servicedata> + <param name="changesrevision">929c7ad0676f084b9ecc469cd47a307596923cb3</param></service></servicedata> (No newline at EOF) ++++++ qtremoteobjects-everywhere-src-5.15.7+kde0.obscpio -> qtremoteobjects-everywhere-src-5.15.8+kde0.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-5.15.7+kde0/.qmake.conf new/qtremoteobjects-everywhere-src-5.15.8+kde0/.qmake.conf --- old/qtremoteobjects-everywhere-src-5.15.7+kde0/.qmake.conf 2022-09-12 17:30:04.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-5.15.8+kde0/.qmake.conf 2022-11-10 21:42:45.000000000 +0100 @@ -4,6 +4,6 @@ DEFINES += QT_NO_JAVA_STYLE_ITERATORS DEFINES += QT_NO_FOREACH -MODULE_VERSION = 5.15.7 +MODULE_VERSION = 5.15.8 QTRO_SOURCE_TREE = $$PWD diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-5.15.7+kde0/src/remoteobjects/qconnection_tcpip_backend.cpp new/qtremoteobjects-everywhere-src-5.15.8+kde0/src/remoteobjects/qconnection_tcpip_backend.cpp --- old/qtremoteobjects-everywhere-src-5.15.7+kde0/src/remoteobjects/qconnection_tcpip_backend.cpp 2022-09-12 17:30:04.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-5.15.8+kde0/src/remoteobjects/qconnection_tcpip_backend.cpp 2022-11-10 21:42:45.000000000 +0100 @@ -162,7 +162,7 @@ if (!m_server.isListening()) return nullptr; - return new TcpServerIo(m_server.nextPendingConnection()); + return new TcpServerIo(m_server.nextPendingConnection(), this); } bool TcpServerImpl::hasPendingConnections() const diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-5.15.7+kde0/src/remoteobjects/qremoteobjectabstractitemmodelreplica.cpp new/qtremoteobjects-everywhere-src-5.15.8+kde0/src/remoteobjects/qremoteobjectabstractitemmodelreplica.cpp --- old/qtremoteobjects-everywhere-src-5.15.7+kde0/src/remoteobjects/qremoteobjectabstractitemmodelreplica.cpp 2022-09-12 17:30:04.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-5.15.8+kde0/src/remoteobjects/qremoteobjectabstractitemmodelreplica.cpp 2022-11-10 21:42:45.000000000 +0100 @@ -268,6 +268,8 @@ auto parentItem = cacheData(parentIndex); q->beginInsertRows(parentIndex, start, end); parentItem->insertChildren(start, end); + for (int i = start; i <= end; ++i) + m_headerData[1].append(CacheEntry()); q->endInsertRows(); if (!parentItem->hasChildren && parentItem->columnCount > 0) { parentItem->hasChildren = true; @@ -294,6 +296,8 @@ return; q->beginInsertColumns(parentIndex, start, end); parentItem->columnCount += end - start + 1; + for (int i = start; i <= end; ++i) + m_headerData[0].append(CacheEntry()); q->endInsertColumns(); if (!parentItem->hasChildren && parentItem->children.size() > 0) { parentItem->hasChildren = true; @@ -315,6 +319,7 @@ q->beginRemoveRows(parentIndex, start, end); if (parentItem) parentItem->removeChildren(start, end); + m_headerData[1].erase(m_headerData[1].begin() + start, m_headerData[1].begin() + end + 1); q->endRemoveRows(); } @@ -673,7 +678,7 @@ // TODO clean cache const int index = orientation == Qt::Horizontal ? 0 : 1; QVector<CacheEntry> &entries = m_headerData[index]; - for (int i = first; i < last; ++i ) + for (int i = first; i <= last && i < entries.size(); ++i ) entries[i].data.clear(); emit q->headerDataChanged(orientation, first, last); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-5.15.7+kde0/src/remoteobjects/qremoteobjectsource.cpp new/qtremoteobjects-everywhere-src-5.15.8+kde0/src/remoteobjects/qremoteobjectsource.cpp --- old/qtremoteobjects-everywhere-src-5.15.7+kde0/src/remoteobjects/qremoteobjectsource.cpp 2022-09-12 17:30:04.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-5.15.8+kde0/src/remoteobjects/qremoteobjectsource.cpp 2022-11-10 21:42:45.000000000 +0100 @@ -75,8 +75,11 @@ return QByteArray{}; } -inline bool qtro_is_cloned_method(const QMetaObject *mobj, int local_method_index) +inline bool qtro_is_cloned_method(const QMetaObject *mobj, int index) { + int local_method_index = index - mobj->methodOffset(); + if (local_method_index < 0 && mobj->superClass()) + return qtro_is_cloned_method(mobj->superClass(), index); const auto priv = reinterpret_cast<const QtPrivate::QMetaObjectPrivate*>(mobj->d.data); Q_ASSERT(local_method_index < priv->methodCount); int handle = priv->methodData + 5 * local_method_index; @@ -191,9 +194,8 @@ const auto targetMeta = isAdapter ? m_adapter->metaObject() : meta; // don't connect cloned signals, or we end up with multiple emissions - if (qtro_is_cloned_method(targetMeta, sourceIndex - targetMeta->methodOffset())) + if (qtro_is_cloned_method(targetMeta, sourceIndex)) continue; - // This basically connects the parent Signals (note, all dynamic properties have onChange //notifications, thus signals) to us. Normally each Signal is mapped to a unique index, //but since we are forwarding them all, we keep the offset constant. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-5.15.7+kde0/tests/auto/auto.pro new/qtremoteobjects-everywhere-src-5.15.8+kde0/tests/auto/auto.pro --- old/qtremoteobjects-everywhere-src-5.15.7+kde0/tests/auto/auto.pro 2022-09-12 17:30:04.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-5.15.8+kde0/tests/auto/auto.pro 2022-11-10 21:42:45.000000000 +0100 @@ -24,4 +24,4 @@ contains(QT_CONFIG, ssl): SUBDIRS += external_IODevice qtHaveModule(qml): SUBDIRS += qml -qtConfig(process): SUBDIRS += integration_multiprocess proxy_multiprocess integration_external restart +qtConfig(process): SUBDIRS += integration_multiprocess proxy_multiprocess integration_external restart reconnect diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-5.15.7+kde0/tests/auto/modelview/tst_modelview.cpp new/qtremoteobjects-everywhere-src-5.15.8+kde0/tests/auto/modelview/tst_modelview.cpp --- old/qtremoteobjects-everywhere-src-5.15.7+kde0/tests/auto/modelview/tst_modelview.cpp 2022-09-12 17:30:04.000000000 +0200 +++ new/qtremoteobjects-everywhere-src-5.15.8+kde0/tests/auto/modelview/tst_modelview.cpp 2022-11-10 21:42:45.000000000 +0100 @@ -499,6 +499,7 @@ void testInitialData(); void testInitialDataTree(); void testHeaderData(); + void testHeaderDataChange(); void testFlags(); void testDataChanged(); void testDataChangedTree(); @@ -650,6 +651,34 @@ QCOMPARE(model->headerData(i, Qt::Horizontal, Qt::DisplayRole), m_sourceModel.headerData(i, Qt::Horizontal, Qt::DisplayRole)); } +void TestModelView::testHeaderDataChange() +{ + _SETUP_TEST_ + QString newHeader = QStringLiteral("New header name"); + QScopedPointer<QAbstractItemModelReplica> model(client.acquireModel("test")); + + FetchData f(model.data()); + QVERIFY(f.fetchAndWait(MODELTEST_WAIT_TIME)); + QVERIFY(model->headerData(0, Qt::Horizontal, Qt::DisplayRole).toString() != newHeader); + + QSignalSpy spyHeader(model.data(), &QAbstractItemModelReplica::headerDataChanged); + m_sourceModel.setHeaderData(0, Qt::Horizontal, newHeader, Qt::DisplayRole); + spyHeader.wait(); + QTRY_COMPARE(model->headerData(0, Qt::Horizontal, Qt::DisplayRole).toString(), newHeader); + + spyHeader.clear(); + m_sourceModel.setHeaderData(1, Qt::Horizontal, newHeader, Qt::DisplayRole); + spyHeader.wait(); + QTRY_COMPARE(model->headerData(1, Qt::Horizontal, Qt::DisplayRole).toString(), newHeader); + + QString anotherHeader = QStringLiteral("Modified header name"); + m_sourceModel.setHeaderData(0, Qt::Horizontal, anotherHeader, Qt::DisplayRole); + spyHeader.wait(); + + QTRY_COMPARE(model->headerData(0, Qt::Horizontal, Qt::DisplayRole).toString(), anotherHeader); + QCOMPARE(model->headerData(1, Qt::Horizontal, Qt::DisplayRole).toString(), newHeader); +} + void TestModelView::testDataChangedTree() { _SETUP_TEST_ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-5.15.7+kde0/tests/auto/reconnect/client/client.pro new/qtremoteobjects-everywhere-src-5.15.8+kde0/tests/auto/reconnect/client/client.pro --- old/qtremoteobjects-everywhere-src-5.15.7+kde0/tests/auto/reconnect/client/client.pro 1970-01-01 01:00:00.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-5.15.8+kde0/tests/auto/reconnect/client/client.pro 2022-11-10 21:42:45.000000000 +0100 @@ -0,0 +1,11 @@ +TEMPLATE = app +TARGET = qtro_reconnect_client + +DESTDIR = ./ + +QT += testlib remoteobjects +QT -= gui + +CONFIG -= app_bundle + +SOURCES += main.cpp diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-5.15.7+kde0/tests/auto/reconnect/client/main.cpp new/qtremoteobjects-everywhere-src-5.15.8+kde0/tests/auto/reconnect/client/main.cpp --- old/qtremoteobjects-everywhere-src-5.15.7+kde0/tests/auto/reconnect/client/main.cpp 1970-01-01 01:00:00.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-5.15.8+kde0/tests/auto/reconnect/client/main.cpp 2022-11-10 21:42:45.000000000 +0100 @@ -0,0 +1,63 @@ +/**************************************************************************** +** +** Copyright (C) 2021 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the QtRemoteObjects module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QCoreApplication> +#include <QtTest/QtTest> +#include <QtRemoteObjects/qremoteobjectnode.h> + +class tst_Client_Process : public QObject +{ + Q_OBJECT + +private Q_SLOTS: + void testRun() + { + const QString url = qEnvironmentVariable("RO_URL"); + QRemoteObjectNode node; + node.connectToNode(QUrl(url)); + QRemoteObjectDynamicReplica *ro = node.acquireDynamic("SourceObj"); + + QSignalSpy initSpy(ro, &QRemoteObjectDynamicReplica::initialized); + QVERIFY(initSpy.wait()); + QSignalSpy pongSpy(ro, SIGNAL(pong())); + QMetaObject::invokeMethod(ro, "ping"); + QVERIFY(pongSpy.wait()); + QMetaObject::invokeMethod(ro, "ping"); + + QVERIFY(initSpy.wait()); + QMetaObject::invokeMethod(ro, "ping"); + QVERIFY(pongSpy.wait()); + QMetaObject::invokeMethod(ro, "ping"); + QTest::qWait(100); + delete ro; + } +}; + +QTEST_MAIN(tst_Client_Process) + +#include "main.moc" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-5.15.7+kde0/tests/auto/reconnect/reconnect.pro new/qtremoteobjects-everywhere-src-5.15.8+kde0/tests/auto/reconnect/reconnect.pro --- old/qtremoteobjects-everywhere-src-5.15.7+kde0/tests/auto/reconnect/reconnect.pro 1970-01-01 01:00:00.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-5.15.8+kde0/tests/auto/reconnect/reconnect.pro 2022-11-10 21:42:45.000000000 +0100 @@ -0,0 +1,2 @@ +TEMPLATE = subdirs +SUBDIRS = client server tst diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-5.15.7+kde0/tests/auto/reconnect/server/main.cpp new/qtremoteobjects-everywhere-src-5.15.8+kde0/tests/auto/reconnect/server/main.cpp --- old/qtremoteobjects-everywhere-src-5.15.7+kde0/tests/auto/reconnect/server/main.cpp 1970-01-01 01:00:00.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-5.15.8+kde0/tests/auto/reconnect/server/main.cpp 2022-11-10 21:42:45.000000000 +0100 @@ -0,0 +1,79 @@ +/**************************************************************************** +** +** Copyright (C) 2021 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the QtRemoteObjects module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QCoreApplication> +#include <QtTest/QtTest> +#include <QtRemoteObjects/qremoteobjectnode.h> +#include <QtRemoteObjects/qremoteobjectsource.h> + + +class SourceObj : public QObject +{ + Q_OBJECT + +public Q_SLOTS: + void ping() { ++m_pingCount; }; + +Q_SIGNALS: + void pong(); + +public: + int m_pingCount = 0; +}; + +class tst_Server_Process : public QObject +{ + Q_OBJECT + +private Q_SLOTS: + void testRun() + { + const QString url = qEnvironmentVariable("RO_URL"); + QRemoteObjectHost *srcNode = new QRemoteObjectHost(QUrl(url)); + SourceObj so; + so.setObjectName(QStringLiteral("SourceObj")); + srcNode->enableRemoting(&so); + + QTRY_VERIFY(so.m_pingCount == 1); + emit so.pong(); + QTRY_VERIFY(so.m_pingCount == 2); + delete srcNode; + + srcNode = new QRemoteObjectHost(QUrl(url)); + srcNode->enableRemoting(&so); + + QTRY_VERIFY(so.m_pingCount == 3); + emit so.pong(); + QTRY_VERIFY(so.m_pingCount == 4); + delete srcNode; + } +}; + +QTEST_MAIN(tst_Server_Process) + +#include "main.moc" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-5.15.7+kde0/tests/auto/reconnect/server/server.pro new/qtremoteobjects-everywhere-src-5.15.8+kde0/tests/auto/reconnect/server/server.pro --- old/qtremoteobjects-everywhere-src-5.15.7+kde0/tests/auto/reconnect/server/server.pro 1970-01-01 01:00:00.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-5.15.8+kde0/tests/auto/reconnect/server/server.pro 2022-11-10 21:42:45.000000000 +0100 @@ -0,0 +1,11 @@ +TEMPLATE = app +TARGET = qtro_reconnect_server + +DESTDIR = ./ + +QT += testlib remoteobjects +QT -= gui + +CONFIG -= app_bundle + +SOURCES += main.cpp diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-5.15.7+kde0/tests/auto/reconnect/tst/tst.pro new/qtremoteobjects-everywhere-src-5.15.8+kde0/tests/auto/reconnect/tst/tst.pro --- old/qtremoteobjects-everywhere-src-5.15.7+kde0/tests/auto/reconnect/tst/tst.pro 1970-01-01 01:00:00.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-5.15.8+kde0/tests/auto/reconnect/tst/tst.pro 2022-11-10 21:42:45.000000000 +0100 @@ -0,0 +1,12 @@ +TEMAPLATE=app +TARGET = tst_reconnect + +DESTDIR = ./ + +QT += testlib remoteobjects +QT -= gui + +CONFIG += testcase +CONFIG -= app_bundle + +SOURCES += tst_reconnect.cpp diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtremoteobjects-everywhere-src-5.15.7+kde0/tests/auto/reconnect/tst/tst_reconnect.cpp new/qtremoteobjects-everywhere-src-5.15.8+kde0/tests/auto/reconnect/tst/tst_reconnect.cpp --- old/qtremoteobjects-everywhere-src-5.15.7+kde0/tests/auto/reconnect/tst/tst_reconnect.cpp 1970-01-01 01:00:00.000000000 +0100 +++ new/qtremoteobjects-everywhere-src-5.15.8+kde0/tests/auto/reconnect/tst/tst_reconnect.cpp 2022-11-10 21:42:45.000000000 +0100 @@ -0,0 +1,87 @@ +/**************************************************************************** +** +** Copyright (C) 2021 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the QtRemoteObjects module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtTest/QtTest> +#include <QStandardPaths> +#include <QProcess> + + +static QString findExecutable(const QString &executableName, const QString &searchPath) +{ + const QString path = QStandardPaths::findExecutable(executableName, { searchPath }); + if (!path.isEmpty()) + return path; + + qWarning() << "Could not find executable:" << executableName << "in" << searchPath; + return QString(); +} + + +class tst_Reconnect: public QObject +{ + Q_OBJECT + +private slots: + void testRun_data() + { + QTest::addColumn<QString>("url"); + QTest::addRow("local") << QStringLiteral("local:replica"); + QTest::addRow("tcp") << QStringLiteral("tcp://127.0.0.1:65217"); + } + + void testRun() + { + QFETCH(QString, url); + + QProcess serverProc; + serverProc.setProcessChannelMode(QProcess::ForwardedChannels); + QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); + env.insert("RO_URL", url); + serverProc.setProcessEnvironment(env); + const QString appDir = QCoreApplication::applicationDirPath(); + serverProc.start(findExecutable("qtro_reconnect_server", appDir + QLatin1String("/../server/")), QStringList()); + QVERIFY(serverProc.waitForStarted()); + + QProcess clientProc; + clientProc.setProcessChannelMode(QProcess::ForwardedChannels); + clientProc.setProcessEnvironment(env); + clientProc.start(findExecutable("qtro_reconnect_client", appDir + QLatin1String("/../client/")), QStringList()); + qDebug() << "Started server and client process on:" << url; + QVERIFY(clientProc.waitForStarted()); + + QVERIFY(clientProc.waitForFinished()); + QVERIFY(serverProc.waitForFinished()); + + QCOMPARE(serverProc.exitCode(), 0); + QCOMPARE(clientProc.exitCode(), 0); + } +}; + +QTEST_MAIN(tst_Reconnect) + +#include "tst_reconnect.moc" ++++++ qtremoteobjects-everywhere-src.obsinfo ++++++ --- /var/tmp/diff_new_pack.tuhV9v/_old 2023-01-11 14:36:14.129631476 +0100 +++ /var/tmp/diff_new_pack.tuhV9v/_new 2023-01-11 14:36:14.129631476 +0100 @@ -1,5 +1,5 @@ name: qtremoteobjects-everywhere-src -version: 5.15.7+kde0 -mtime: 1662996604 -commit: 5f2a598a9134167a0da2efcbf1249fc167ae3750 +version: 5.15.8+kde0 +mtime: 1668112965 +commit: 929c7ad0676f084b9ecc469cd47a307596923cb3