Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package qt6-grpc for openSUSE:Factory checked in at 2023-12-04 22:59:46 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/qt6-grpc (Old) and /work/SRC/openSUSE:Factory/.qt6-grpc.new.25432 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qt6-grpc" Mon Dec 4 22:59:46 2023 rev:7 rq:1130408 version:6.6.1 Changes: -------- --- /work/SRC/openSUSE:Factory/qt6-grpc/qt6-grpc.changes 2023-10-13 23:14:38.998969396 +0200 +++ /work/SRC/openSUSE:Factory/.qt6-grpc.new.25432/qt6-grpc.changes 2023-12-04 22:59:50.852007651 +0100 @@ -1,0 +2,8 @@ +Mon Nov 27 14:00:09 UTC 2023 - Christophe Marin <christo...@krop.fr> + +- Update to 6.6.1: + * https://www.qt.io/blog/qt-6.6.1-released +- Add upstream changes: + * 0001-Fix-re-initializing-a-moved-from-QProtobufMessage-us.patch + +------------------------------------------------------------------- Old: ---- qtgrpc-everywhere-src-6.6.0.tar.xz New: ---- 0001-Fix-re-initializing-a-moved-from-QProtobufMessage-us.patch qtgrpc-everywhere-src-6.6.1.tar.xz BETA DEBUG BEGIN: New:- Add upstream changes: * 0001-Fix-re-initializing-a-moved-from-QProtobufMessage-us.patch BETA DEBUG END: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ qt6-grpc.spec ++++++ --- /var/tmp/diff_new_pack.QmsFJ5/_old 2023-12-04 22:59:51.560033706 +0100 +++ /var/tmp/diff_new_pack.QmsFJ5/_new 2023-12-04 22:59:51.564033853 +0100 @@ -16,7 +16,7 @@ # -%define real_version 6.6.0 +%define real_version 6.6.1 %define short_version 6.6 %define short_name qtgrpc %define tar_name qtgrpc-everywhere-src @@ -28,12 +28,14 @@ %endif # Name: qt6-grpc%{?pkg_suffix} -Version: 6.6.0 +Version: 6.6.1 Release: 0 Summary: gRPC and Protobuf generator and bindings for Qt framework License: GPL-3.0-or-later URL: https://www.qt.io Source: https://download.qt.io/official_releases/qt/%{short_version}/%{real_version}%{tar_suffix}/submodules/%{tar_name}-%{real_version}%{tar_suffix}.tar.xz +# PATCH-FIX-UPSTREAM +Patch0: 0001-Fix-re-initializing-a-moved-from-QProtobufMessage-us.patch BuildRequires: pkgconfig BuildRequires: qt6-core-private-devel BuildRequires: cmake(Qt6Core) = %{real_version} @@ -44,8 +46,7 @@ BuildRequires: cmake(Qt6Widgets) = %{real_version} BuildRequires: pkgconfig(grpc++) BuildRequires: pkgconfig(libprotobuf-c) -# qtgrpc is not compatible with protobuf 23 and protobuf-c is not compatible with 22 either -BuildRequires: pkgconfig(protobuf) < 22 +BuildRequires: pkgconfig(protobuf) %if "%{qt6_flavor}" == "docs" BuildRequires: qt6-tools %{qt6_doc_packages} ++++++ 0001-Fix-re-initializing-a-moved-from-QProtobufMessage-us.patch ++++++ >From 0ce7f59cc15da9759d55e6a6b332d2a1bd7f78b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= <marten.nordh...@qt.io> Date: Fri, 17 Nov 2023 15:32:14 +0100 Subject: [PATCH] Fix re-initializing a moved-from QProtobufMessage using copy It was expecting the data-pointer was not nullptr, but after moving out it is. Fixes: QTBUG-119227 Change-Id: I3a8907dd0e16b33604481d9d6c382c238b067676 Reviewed-by: Alexey Edelev <alexey.ede...@qt.io> (cherry picked from commit 0bc538fa9a544255753bfc387e6b620a10b6d1fa) Reviewed-by: Qt Cherry-pick Bot <cherrypick_...@qt-project.org> --- src/protobuf/qprotobufmessage.cpp | 6 ++++- .../basic/tst_protobuf_basictypes.cpp | 26 +++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/src/protobuf/qprotobufmessage.cpp b/src/protobuf/qprotobufmessage.cpp index 124ec50..2e29b43 100644 --- a/src/protobuf/qprotobufmessage.cpp +++ b/src/protobuf/qprotobufmessage.cpp @@ -148,7 +148,11 @@ QProtobufMessage::QProtobufMessage(const QProtobufMessage &other) */ QProtobufMessage &QProtobufMessage::operator=(const QProtobufMessage &other) { - if (this != &other) + if (!other.d_ptr) + delete std::exchange(d_ptr, {}); // delete d_ptr if other.d_ptr is null + else if (!d_ptr) + d_ptr = new QProtobufMessagePrivate(*other.d_ptr); + else if (this != &other) *d_ptr = *other.d_ptr; return *this; } diff --git a/tests/auto/protobuf/basic/tst_protobuf_basictypes.cpp b/tests/auto/protobuf/basic/tst_protobuf_basictypes.cpp index 83d3c6e..b2e8270 100644 --- a/tests/auto/protobuf/basic/tst_protobuf_basictypes.cpp +++ b/tests/auto/protobuf/basic/tst_protobuf_basictypes.cpp @@ -62,6 +62,18 @@ void QtProtobufTypesGenerationTest::EmptyMessageTest() QProtobufMessagePointer rawMessage( QProtobufMessage::constructByName("qtprotobufnamespace.tests.EmptyMessage")); QVERIFY(reinterpret_cast<qtprotobufnamespace::tests::EmptyMessage*>(rawMessage.get()) != nullptr); + + // Move from and reuse. This should compile and run: + qtprotobufnamespace::tests::EmptyMessage from; + qtprotobufnamespace::tests::EmptyMessage to = std::move(from); + from = to; + QCOMPARE(from, to); + + qtprotobufnamespace::tests::EmptyMessage bucket = std::move(to); + bucket = std::move(from); + + from = to; + QCOMPARE(from, to); } void QtProtobufTypesGenerationTest::BoolMessageTest() @@ -77,6 +89,20 @@ void QtProtobufTypesGenerationTest::BoolMessageTest() QCOMPARE(SimpleBoolMessage::TestFieldBoolProtoFieldNumber, 1); QCOMPARE(test.propertyOrdering.getMessageFullName(), "qtprotobufnamespace.tests.SimpleBoolMessage"); + + // Move from and reuse + qtprotobufnamespace::tests::SimpleBoolMessage from; + qtprotobufnamespace::tests::SimpleBoolMessage to = std::move(from); + from = to; + QCOMPARE(from.testFieldBool(), to.testFieldBool()); + // Changes in one should not be visible in the other: + to.setTestFieldBool(!to.testFieldBool()); + QCOMPARE_NE(from.testFieldBool(), to.testFieldBool()); + + from = to; + to.setProperty(propertyName, QVariant::fromValue(!to.testFieldBool())); + QCOMPARE_NE(from.testFieldBool(), to.testFieldBool()); + } void QtProtobufTypesGenerationTest::IntMessageTest() -- 2.42.1 ++++++ qtgrpc-everywhere-src-6.6.0.tar.xz -> qtgrpc-everywhere-src-6.6.1.tar.xz ++++++ ++++ 5948 lines of diff (skipped)