aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2022-03-10 08:42:03 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2022-03-11 12:17:35 +0100
commit6983518e808bee94233f10ce027260e1a2316113 (patch)
tree83475ce96e1e0f4ffc90ba08755274fcb9062b62
parent5044bf32686b08588a42cf960ac330e897ba0433 (diff)
PySide6: Fix properties of type QQmlPropertyMap *
Add a call to qRegisterMetaType(). Fixes: PYSIDE-1845 Change-Id: I25df264fc13dc515cd6035df8e0b608a7dabaa74 Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 4118576eda30e76384b4cd846c16c0d0b39a3cc9) (cherry picked from commit 1cb612c8fc17e05a3b592c2a4bedb229b02cc6e5)
-rw-r--r--sources/pyside6/PySide6/QtQml/typesystem_qml.xml1
-rw-r--r--sources/pyside6/PySide6/glue/qtqml.cpp2
2 files changed, 3 insertions, 0 deletions
diff --git a/sources/pyside6/PySide6/QtQml/typesystem_qml.xml b/sources/pyside6/PySide6/QtQml/typesystem_qml.xml
index 799c9cda8..113bebef1 100644
--- a/sources/pyside6/PySide6/QtQml/typesystem_qml.xml
+++ b/sources/pyside6/PySide6/QtQml/typesystem_qml.xml
@@ -60,6 +60,7 @@
#include "pysideqmllistproperty.h"
#include "pysideqmluncreatable.h"
#include "pysideqmlvolatilebool.h"
+ #include &lt;QtQml/QQmlPropertyMap&gt;
</inject-code>
<!-- This is to inform the generator that the VolatileBool python type exists -->
diff --git a/sources/pyside6/PySide6/glue/qtqml.cpp b/sources/pyside6/PySide6/glue/qtqml.cpp
index 27834e2a7..0c7b0b750 100644
--- a/sources/pyside6/PySide6/glue/qtqml.cpp
+++ b/sources/pyside6/PySide6/glue/qtqml.cpp
@@ -76,6 +76,8 @@ int %0 = PySide::qmlRegisterType(%ARGUMENT_NAMES, false);
initQtQmlListProperty(module);
initQmlUncreatable(module);
initQtQmlVolatileBool(module);
+
+qRegisterMetaType<QQmlPropertyMap *>(); // PYSIDE-1845, QQmlPropertyMap * properties
// @snippet init
// @snippet qjsengine-toscriptvalue