diff options
Diffstat (limited to 'sources/pyside2/PySide2')
| -rw-r--r-- | sources/pyside2/PySide2/QtQml/pysideqmlregistertype.h | 5 | ||||
| -rw-r--r-- | sources/pyside2/PySide2/QtQml/typesystem_qml.xml | 18 |
2 files changed, 16 insertions, 7 deletions
diff --git a/sources/pyside2/PySide2/QtQml/pysideqmlregistertype.h b/sources/pyside2/PySide2/QtQml/pysideqmlregistertype.h index e94ea043f..536348aa3 100644 --- a/sources/pyside2/PySide2/QtQml/pysideqmlregistertype.h +++ b/sources/pyside2/PySide2/QtQml/pysideqmlregistertype.h @@ -73,11 +73,6 @@ int qmlRegisterType(PyObject *pyObj, const char *uri, int versionMajor, int vers // Volatile Bool Ptr type definition. -typedef struct { - PyObject_HEAD - volatile bool flag; -} QtQml_VolatileBoolObject; - PyAPI_FUNC(PyTypeObject *) QtQml_VolatileBoolTypeF(void); #define VolatileBool_Check(op) (Py_TYPE(op) == QtQml_VolatileBoolTypeF()) diff --git a/sources/pyside2/PySide2/QtQml/typesystem_qml.xml b/sources/pyside2/PySide2/QtQml/typesystem_qml.xml index 57979f63f..0a12d44cf 100644 --- a/sources/pyside2/PySide2/QtQml/typesystem_qml.xml +++ b/sources/pyside2/PySide2/QtQml/typesystem_qml.xml @@ -44,10 +44,22 @@ <load-typesystem name="QtNetwork/typesystem_network.xml" generate="no"/> <load-typesystem name="QtGui/typesystem_gui.xml" generate="no"/> + <inject-code class="target" position="declaration"> + // Volatile Bool Ptr type definition. + + typedef struct { + PyObject_HEAD + volatile bool flag; + } QtQml_VolatileBoolObject; + </inject-code> + + <inject-code class="native" position="beginning"> + #include "pysideqmlregistertype.h" + </inject-code> + <!-- This is to inform the generator that the VolatileBool python type exists --> <custom-type name="VolatileBool"/> <primitive-type name="bool volatile" target-lang-api-name="VolatileBool"> - <include file-name="pysideqmlregistertype.h" location="local"/> <!-- No conversion rules are specified here, because the generator does not handle pointer to primitive types without function adjustment. See commit ff0b861b59b41387e771d9cd565e13de8b2750d1 or search for changePStr @@ -85,7 +97,6 @@ <enum-type identified-by-value="QML_HAS_ATTACHED_PROPERTIES"> <extra-includes> <include file-name="QtQml" location="global"/> - <include file-name="pysideqmlregistertype.h" location="local"/> </extra-includes> </enum-type> @@ -159,6 +170,9 @@ <enum-type name="Status"/> </object-type> <object-type name="QQmlIncubationController"> + <extra-includes> + <include file-name="pysideqmlregistertype.h" location="local"/> + </extra-includes> <modify-function signature="incubateWhile(volatile bool*,int)" allow-thread="yes"> <modify-argument index="1"> <!-- The replace type is needed to use the VolatileBool_Check macro instead of |
