diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-07-04 13:01:46 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-07-11 19:01:53 +0000 |
commit | f2443b02fce5dd4182e80ed0e5343586cbd72a31 (patch) | |
tree | 31745405aa0f8f17b5339fe145134c31da150d4a /sources/pyside2/PySide2/QtGui | |
parent | 0a8e37cd60863773940d9d7f21403a841d744720 (diff) |
shiboken: Improve const handling
- Use new enum in code.
- Rewrite the Clang type parsing to make use of it.
- Adapt some typesystem files.
This enables the distinction between "int *" and "int *const"
and fixes the signatures from "int const &" to the more common "const int&".
Task-number: PYSIDE-672
Change-Id: Ic1bff0015188c32f53d0e6f347b1523254cb7e4f
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/pyside2/PySide2/QtGui')
-rw-r--r-- | sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml b/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml index eee22b55c..b679abc87 100644 --- a/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml +++ b/sources/pyside2/PySide2/QtGui/typesystem_gui_common.xml @@ -97,21 +97,21 @@ <rejection class="*" function-name="d_func"/> <rejection class="*" field-name="d_ptr"/> <rejection class="*" field-name="d"/> - <rejection class="^QOpenGL.*$" argument-type="^GLboolean( const)?\*$"/> + <rejection class="^QOpenGL.*$" argument-type="^(const )?GLboolean ?\*$"/> <rejection class="^QOpenGL.*$" argument-type="^GLchar\*$"/> - <rejection class="^QOpenGL.*$" argument-type="GLchar *const const*"/> + <rejection class="^QOpenGL.*$" argument-type="^(const )?GLchar ?\*(const)?\*$"/> <rejection class="^QOpenGL.*$" argument-type="^char\*$"/> - <rejection class="^QOpenGL.*$" argument-type="^char( const)?\*\*$"/> + <rejection class="^QOpenGL.*$" argument-type="^(const )?char ?\*\*$"/> <rejection class="^QOpenGL.*$" argument-type="GLintptr"/> <rejection class="^QOpenGL.*$" argument-type="GLsizeiptr"/> <rejection class="^QOpenGL.*$" argument-type="GLsync"/> <rejection class="^QOpenGL.*$" argument-type="^GLubyte( const)?\*$"/> - <rejection class="^QOpenGL.*$" argument-type="^QMatrix.x.( const)?\*$"/> + <rejection class="^QOpenGL.*$" argument-type="^(const )?QMatrix.x. ?\*$"/> <rejection class="^QOpenGL.*$" argument-type="qopengl_GLintptr"/> <rejection class="^QOpenGL.*$" argument-type="qopengl_GLsizeiptr"/> <rejection class="^QOpenGL.*$" argument-type="QOpenGLTextureHelper*"/> - <rejection class="^QOpenGL.*$" argument-type="^QVector.D( const)?\*$"/> - <rejection class="^QOpenGL.*$" argument-type="^void( const)?\*\*$"/> + <rejection class="^QOpenGL.*$" argument-type="^(const )?QVector.D ?\*$"/> + <rejection class="^QOpenGL.*$" argument-type="^(const )?void ?\*\*$"/> <!-- Event classes have a lot of non-documented protected fields, those fields @@ -668,7 +668,7 @@ %0 = new %TYPE(QPixmap::fromImage(%1)); </inject-code> </add-function> - <modify-function signature="QPixmap(const char*[])"> + <modify-function signature="QPixmap(const char*const[])"> <modify-argument index="1"> <replace-type modified-type="PySequence" /> </modify-argument> @@ -897,7 +897,7 @@ <modify-function signature="QImage(const uchar*,int,int,QImage::Format,QImageCleanupFunction,void*)" remove="all" /> <!-- ### --> - <modify-function signature="QImage(const char*[])"> + <modify-function signature="QImage(const char*const[])"> <modify-argument index="1"> <replace-type modified-type="PySequence" /> </modify-argument> |