[neon/qt6/qt6-base/Neon/release] debian/patches: add qtdbus patch

Carlos De Maine null at kde.org
Wed Nov 8 14:12:24 GMT 2023


Git commit 1a210d77aea913dc456118f6ac8fd360a4714ecd by Carlos De Maine.
Committed on 08/11/2023 at 15:12.
Pushed by carlosdem into branch 'Neon/release'.

add qtdbus patch

A  +45   -0    debian/patches/qtdbus_metatypename
M  +1    -0    debian/patches/series

https://invent.kde.org/neon/qt6/qt6-base/-/commit/1a210d77aea913dc456118f6ac8fd360a4714ecd

diff --git a/debian/patches/qtdbus_metatypename b/debian/patches/qtdbus_metatypename
new file mode 100644
index 0000000..2d2db8c
--- /dev/null
+++ b/debian/patches/qtdbus_metatypename
@@ -0,0 +1,45 @@
+From a668ed44dc98a377a5253410d65fe4b3667e87e6 Mon Sep 17 00:00:00 2001
+From: Kai Uwe Broulik <kde at privat.broulik.de>
+Date: Fri, 20 Oct 2023 17:36:01 +0200
+Subject: QtDBus: Use explicitly meta type name instead of method type
+
+In Qt 6, QMetaType sees the underlying type the compiler knows,
+so a "using VariantMapMap = QMap<QString, QVariantMap>" typedef
+will fail to match a signature of VariantMapMap to QMap<...>
+because qDBusParametersForMethod looks for the method type name
+whose QMetaType::fromName lookup will fail later.
+
+Pick-to: 6.6 6.5
+Change-Id: I142dc42ca86aa8a96f73424ec5da5780f2c1e6a3
+Reviewed-by: Thiago Macieira <thiago.macieira at intel.com>
+---
+ src/dbus/qdbusmisc.cpp | 14 +++++++++++++-
+ 1 file changed, 13 insertions(+), 1 deletion(-)
+
+diff --git a/src/dbus/qdbusmisc.cpp b/src/dbus/qdbusmisc.cpp
+index 5a9d8f548f..635258c86d 100644
+--- a/src/dbus/qdbusmisc.cpp
++++ b/src/dbus/qdbusmisc.cpp
+@@ -123,7 +123,19 @@ bool qDBusInterfaceInObject(QObject *obj, const QString &interface_name)
+ // sig must be the normalised signature for the method
+ int qDBusParametersForMethod(const QMetaMethod &mm, QList<QMetaType> &metaTypes, QString &errorMsg)
+ {
+-    return qDBusParametersForMethod(mm.parameterTypes(), metaTypes, errorMsg);
++    QList<QByteArray> parameterTypes;
++    parameterTypes.reserve(mm.parameterCount());
++
++    // Not using QMetaMethod::parameterTypes() since we call QMetaType::fromName below
++    // where we need any typedefs resolved already.
++    for (int i = 0; i < mm.parameterCount(); ++i) {
++        QByteArray typeName = mm.parameterMetaType(i).name();
++        if (typeName.isEmpty())
++            typeName = mm.parameterTypeName(i);
++        parameterTypes.append(typeName);
++    }
++
++    return qDBusParametersForMethod(parameterTypes, metaTypes, errorMsg);
+ }
+ 
+ #endif // QT_BOOTSTRAPPED
+-- 
+cgit v1.2.3
diff --git a/debian/patches/series b/debian/patches/series
index 679b1e1..ac8f47b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,5 +1,6 @@
 # fixed in 6.6.1
 wayland_ally
+qtdbus_metatypename
 
 # fixed in 6.5.2
 #cve-2023-34410-57ba626.diff


More information about the Neon-commits mailing list