From cc84bd728b222661d670dabc27d5b524314262ae Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Tue, 30 Jan 2024 20:13:41 -0500 Subject: [PATCH] Re-introduce support for QMatrix when building against Qt < 6.0 This partially reverts 10a3e499 ("Qt6 compatibility fixes for core PythonQt library", 2023-08-21) (cherry picked from commit commontk/PythonQt@b2156e9b1b61d35fb3ef19fd5aadeb2246cf9ff8) --- src/PythonQt.cpp | 3 +++ src/PythonQtVariants.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/PythonQt.cpp b/src/PythonQt.cpp index 4d01a15bb..e29498b29 100644 --- a/src/PythonQt.cpp +++ b/src/PythonQt.cpp @@ -260,6 +260,9 @@ void PythonQt::init(int flags, const QByteArray& pythonQtModuleName) PythonQtRegisterToolClassesTemplateConverterForKnownClass(QPen); PythonQtRegisterToolClassesTemplateConverterForKnownClass(QTextLength); PythonQtRegisterToolClassesTemplateConverterForKnownClass(QTextFormat); +#if QT_VERSION < 0x060000 + PythonQtRegisterToolClassesTemplateConverterForKnownClass(QMatrix); +#endif PyObject* pack = PythonQt::priv()->packageByName("QtCore"); PyObject* pack2 = PythonQt::priv()->packageByName("Qt"); diff --git a/src/PythonQtVariants.h b/src/PythonQtVariants.h index 833f35c8a..d2ba9eff6 100644 --- a/src/PythonQtVariants.h +++ b/src/PythonQtVariants.h @@ -72,6 +72,9 @@ #include #include #include +#if QT_VERSION < 0x060000 +#include +#endif #endif