diff options
author | Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> | 2018-02-01 15:11:18 +0100 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2018-02-14 12:10:59 +0000 |
commit | 4566f0cba5ed5cccbec4706e343b4fd68400ff2c (patch) | |
tree | 89c539d8cb4b41fa328721915fba1d2836ccc044 /sources/pyside2/PySide2/QtWidgets | |
parent | 375a8565e1a0f6e0327d50657ac0f08045012809 (diff) |
Apply Qt guidelines to the injected code via XML
There are many inconsistencies in the associated
typesystem files that complement the binding generation,
this is a first attempt to try to standardize it.
Just Qt Coding Style were applied (when possible).
In the future the process to access and manipulate
Shiboken objects must also be standardized.
Change-Id: Ida57d1630a893bc5b608f64119b4c8d638bb9c66
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/pyside2/PySide2/QtWidgets')
-rw-r--r-- | sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml b/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml index d0c4877f2..60bb24335 100644 --- a/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml +++ b/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml @@ -215,7 +215,7 @@ <add-function signature="__next__()" return-type="PyObject*"> <inject-code class="target" position="beginning"> if (**%CPPSELF) { - QTreeWidgetItemIterator* %0 = new QTreeWidgetItemIterator((*%CPPSELF)++); + QTreeWidgetItemIterator *%0 = new QTreeWidgetItemIterator((*%CPPSELF)++); %PYARG_0 = %CONVERTTOPYTHON[QTreeWidgetItemIterator*](%0); } </inject-code> @@ -223,7 +223,7 @@ <add-function signature="value()" return-type="QTreeWidgetItem*"> <inject-code> - QTreeWidgetItem* %0 = %CPPSELF.operator*(); + QTreeWidgetItem *%0 = %CPPSELF.operator*(); %PYARG_0 = %CONVERTTOPYTHON[QTreeWidgetItem*](%0); Shiboken::Object::releaseOwnership(%PYARG_0); </inject-code> @@ -267,7 +267,7 @@ <enum-type name="GraphicsItemFlag" flags="GraphicsItemFlags"/> <enum-type name="PanelModality" since="4.6"/> <inject-code class="target" position="end"> - PyObject* userTypeConstant = PyInt_FromLong(QGraphicsItem::UserType); + PyObject *userTypeConstant = PyInt_FromLong(QGraphicsItem::UserType); PyDict_SetItemString(Sbk_QGraphicsItem_Type.super.ht_type.tp_dict, "UserType", userTypeConstant); </inject-code> <modify-function signature="setParentItem(QGraphicsItem *)"> @@ -277,7 +277,7 @@ </modify-function> <template name="scene_return_parenting"> if (%0) { - QObject* parent = %0->parent(); + QObject *parent = %0->parent(); Shiboken::AutoDecRef pyParent(%CONVERTTOPYTHON[QObject*](parent)); Shiboken::Object::setParent(pyParent, %PYARG_0); } @@ -2992,7 +2992,7 @@ </modify-argument> <inject-code> - QAction* action = %CPPSELF.addAction(%1, %2); + QAction *action = %CPPSELF.addAction(%1, %2); %PYARG_0 = %CONVERTTOPYTHON[QAction*](action); Shiboken::AutoDecRef result(PyObject_CallMethod(%PYARG_0, "connect", "OsO", %PYARG_0, SIGNAL(triggered()), %PYARG_3)); </inject-code> @@ -3008,7 +3008,7 @@ <parent index="this" action="add"/> </modify-argument> <inject-code> - QAction* action = %CPPSELF.addAction(%1); + QAction *action = %CPPSELF.addAction(%1); %PYARG_0 = %CONVERTTOPYTHON[QAction*](action); Shiboken::AutoDecRef result(PyObject_CallMethod(%PYARG_0, "connect", "OsO", %PYARG_0, SIGNAL(triggered()), %PYARG_2)); </inject-code> |