summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Szuba <marecki@gentoo.org>2024-03-05 14:02:29 +0000
committerMarek Szuba <marecki@gentoo.org>2024-03-05 14:02:29 +0000
commit2e53face582e29ee3553720d0a102d176398809f (patch)
treedcb1a17c7f7ffb10371d8338f818d40402e6c5be /dev-python/pyotherside
parentdev-python/mkdocs-ansible: the omitted "update the patch" commit (diff)
downloadgentoo-2e53face582e29ee3553720d0a102d176398809f.tar.gz
gentoo-2e53face582e29ee3553720d0a102d176398809f.tar.bz2
gentoo-2e53face582e29ee3553720d0a102d176398809f.zip
dev-python/pyotherside: add missing qt6 patch
Aaargh. Signed-off-by: Marek Szuba <marecki@gentoo.org>
Diffstat (limited to 'dev-python/pyotherside')
-rw-r--r--dev-python/pyotherside/files/pyotherside-1.6.0-qt6.5.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/dev-python/pyotherside/files/pyotherside-1.6.0-qt6.5.patch b/dev-python/pyotherside/files/pyotherside-1.6.0-qt6.5.patch
new file mode 100644
index 000000000000..08844cc8338d
--- /dev/null
+++ b/dev-python/pyotherside/files/pyotherside-1.6.0-qt6.5.patch
@@ -0,0 +1,34 @@
+From 45044252aaf73262cd46443acd049e7afcdf072b Mon Sep 17 00:00:00 2001
+From: Thomas Perl <m@thp.io>
+Date: Sat, 2 Dec 2023 18:46:06 +0100
+Subject: [PATCH] Fix build error with Qt >= 6.5 (fixes #128)
+
+--- a/src/qpython_priv.cpp
++++ b/src/qpython_priv.cpp
+@@ -405,8 +405,25 @@ pyotherside_QObjectMethod_call(PyObject *callable_object, PyObject *args, PyObje
+ }
+
+ QVariant result;
++#if QT_VERSION < QT_VERSION_CHECK(6, 5, 0)
++ QGenericReturnArgument returnArg = Q_RETURN_ARG(QVariant, result);
++#else
++ /**
++ * Starting with Qt 6.5, Q_RETURN_ARG() expands to a QMetaMethodReturnArgument,
++ * whereas previously it returned a QGenericReturnArgument. Since we are using
++ * the old, deprecated QMetaMethod::invoke() functions, and those take a
++ * QGenericReturnArgument and not a QMetaMethodReturnArgument, we need to
++ * create the QGenericReturnArgument ourselves by emulating what Q_RETURN_ARG()
++ * does in old Qt versions before 6.5.
++ *
++ * See also:
++ * https://bugreports.qt.io/browse/QTBUG-113147
++ * https://github.com/thp/pyotherside/issues/128
++ **/
++ QGenericReturnArgument returnArg {QT_STRINGIFY(QVariant), &result};
++#endif
+ if (method.invoke(o, Qt::DirectConnection,
+- Q_RETURN_ARG(QVariant, result), genericArguments.value(0),
++ returnArg, genericArguments.value(0),
+ genericArguments.value(1), genericArguments.value(2),
+ genericArguments.value(3), genericArguments.value(4),
+ genericArguments.value(5), genericArguments.value(6),