aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/PySide2/QtGui
diff options
context:
space:
mode:
authorCristian Maureira-Fredes <cristian.maureira-fredes@qt.io>2018-11-29 09:29:48 +0100
committerCristian Maureira-Fredes <cristian.maureira-fredes@qt.io>2018-11-29 14:36:49 +0000
commit36a9cd48344c8cfb776dea78c60e7d6760711197 (patch)
treed698778c95c8c891e01f683a1dd52dceb0d9026e /sources/pyside2/PySide2/QtGui
parent6007f0785a0107204c522e466f82bd817fcf60f9 (diff)
Move add-conversion and native-to-target code
Now we are able to include snippets for the previously mentioned typesystem's tags, so this patch removes the current C/C++ code from the typesystems. Task-number: PYSIDE-834 Change-Id: I2929020fa1dc0859db780dffb12fa292627697b0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'sources/pyside2/PySide2/QtGui')
-rw-r--r--sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml8
1 files changed, 2 insertions, 6 deletions
diff --git a/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml b/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml
index 090b7a4ec..f417b8e74 100644
--- a/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml
+++ b/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml
@@ -203,13 +203,9 @@
<primitive-type name="WId" target-lang-api-name="PyLong">
<conversion-rule>
- <native-to-target>
- return PyLong_FromVoidPtr(reinterpret_cast&lt;void *&gt;(%in));
- </native-to-target>
+ <native-to-target file="../glue/qtgui.cpp" snippet="return-pylong-voidptr"/>
<target-to-native>
- <add-conversion type="PyLong">
- %out = reinterpret_cast&lt;%OUTTYPE&gt;(PyLong_AsVoidPtr(%in));
- </add-conversion>
+ <add-conversion type="PyLong" file="../glue/qtgui.cpp" snippet="conversion-pylong"/>
</target-to-native>
</conversion-rule>
</primitive-type>