diff options
author | Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> | 2018-08-31 14:27:02 +0200 |
---|---|---|
committer | Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> | 2018-11-28 16:11:36 +0000 |
commit | 0363a0986e19bfb97ed1b899fc1431a0e1b14dcb (patch) | |
tree | 9c5b67a91e61033b415f8d6b8d62c6ec86fd5dac /sources/pyside2/PySide2/QtOpenGL | |
parent | addfdfb1ff195e36d412dc7aa3dde2f2d474c0ed (diff) |
Place templates per module
There is a main template file that hosts most of the
code-templates we use in the typesystems, but there
were still several templates written in each module-typesystem
file.
The templates that are used on different typesystem
are now placed in:
sources/pyside2/PySide2/templates/core_common.xml
Additionally, the templates used only by a certain module,
are placed next to it, e.g.:
sources/pyside2/PySide2/templates/widgets_common.xml
Some simple templates were moved to the snippets files too.
Task-number: PYSIDE-799
Change-Id: I4f355cf2ae983aba9e85414e910550189cd18dcb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'sources/pyside2/PySide2/QtOpenGL')
-rw-r--r-- | sources/pyside2/PySide2/QtOpenGL/typesystem_opengl.xml | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/sources/pyside2/PySide2/QtOpenGL/typesystem_opengl.xml b/sources/pyside2/PySide2/QtOpenGL/typesystem_opengl.xml index 59019faa1..a234e95d6 100644 --- a/sources/pyside2/PySide2/QtOpenGL/typesystem_opengl.xml +++ b/sources/pyside2/PySide2/QtOpenGL/typesystem_opengl.xml @@ -40,7 +40,8 @@ ****************************************************************************/ --> <typesystem package="PySide2.QtOpenGL"> - <load-typesystem name="QtWidgets/typesystem_widgets.xml" generate="no"/> + <load-typesystem name="QtWidgets/typesystem_widgets.xml" generate="no" /> + <load-typesystem name="templates/opengl_common.xml" generate="no" /> <primitive-type name="GLbitfield"/> <primitive-type name="GLboolean"/> @@ -136,24 +137,6 @@ <enum-type name="ShaderTypeBit" flags="ShaderType"/> </object-type> - <template name="callArrayFunction"> - int _size = PySequence_Size(%PYARG_2); - if (_size) { - $ATTR_TYPE *_list = new $ATTR_TYPE[_size]; - if (_size) { - Shiboken::AutoDecRef fast(PySequence_Fast(%PYARG_2, "Failed to parse sequence with type %VECTOR_TYPE.")); - for(int i=0; i < _size; i++) { - PyObject* pv = PySequence_Fast_GET_ITEM(fast.object(), i); - _list[i] = %CONVERTTOCPP[$ATTR_TYPE](pv); - } - } - %CPPSELF.%FUNCTION_NAME(%1, _list, $ARG0); - delete[] _list; - } else { - %CPPSELF.%FUNCTION_NAME(%1, ($ATTR_TYPE*)NULL, $ARG1); - } - </template> - <object-type name="QGLShaderProgram" since="4.6"> <!-- setAttributeArray --> <modify-function signature="setAttributeArray(int,const QVector2D*,int)" rename="setAttributeArray2D"> |