aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/PySide2/QtWidgets
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2017-12-17 19:12:56 +0100
committerAlexandru Croitor <alexandru.croitor@qt.io>2018-05-30 18:13:41 +0000
commit18dc31becdd994c53a9f894087cf1ef99fbd0232 (patch)
tree3021cfa473f20102bfb63a26117776615b91b526 /sources/pyside2/PySide2/QtWidgets
parent50dd4ae202d7afb3556335c056db003f5ef50532 (diff)
PEP 384-squash: Implement PEP 384
This is the condensed checkin of 18 commits which created the implementation of PEP 384. Task-number: PYSIDE-560 Change-Id: I834c659af4c2b55b268f8e8dc4cfa53f02502409 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'sources/pyside2/PySide2/QtWidgets')
-rw-r--r--sources/pyside2/PySide2/QtWidgets/glue/qmenu_glue.cpp6
-rw-r--r--sources/pyside2/PySide2/QtWidgets/glue/qmenubar_glue.cpp5
-rw-r--r--sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml20
3 files changed, 25 insertions, 6 deletions
diff --git a/sources/pyside2/PySide2/QtWidgets/glue/qmenu_glue.cpp b/sources/pyside2/PySide2/QtWidgets/glue/qmenu_glue.cpp
index 8a4b7e62..4e9c8c3b 100644
--- a/sources/pyside2/PySide2/QtWidgets/glue/qmenu_glue.cpp
+++ b/sources/pyside2/PySide2/QtWidgets/glue/qmenu_glue.cpp
@@ -50,7 +50,11 @@ inline PyObject* addActionWithPyObject(QMenu* self, const QIcon& icon, const QSt
self->addAction(act);
PyObject* pyAct = %CONVERTTOPYTHON[QAction*](act);
- Shiboken::AutoDecRef result(PyObject_CallMethod(pyAct, "connect", "OsO", pyAct, SIGNAL(triggered()), callback));
+ Shiboken::AutoDecRef result(PyObject_CallMethod(pyAct,
+ const_cast<char *>("connect"),
+ const_cast<char *>("OsO"),
+ pyAct,
+ SIGNAL(triggered()), callback));
if (result.isNull()) {
Py_DECREF(pyAct);
return 0;
diff --git a/sources/pyside2/PySide2/QtWidgets/glue/qmenubar_glue.cpp b/sources/pyside2/PySide2/QtWidgets/glue/qmenubar_glue.cpp
index fdd62112..8cdbc2e0 100644
--- a/sources/pyside2/PySide2/QtWidgets/glue/qmenubar_glue.cpp
+++ b/sources/pyside2/PySide2/QtWidgets/glue/qmenubar_glue.cpp
@@ -45,7 +45,10 @@ addActionWithPyObject(QMenuBar* self, const QString& text, PyObject* callback)
self->addAction(act);
PyObject* pyAct = %CONVERTTOPYTHON[QAction*](act);
- PyObject* result = PyObject_CallMethod(pyAct, "connect", "OsO", pyAct,
+ PyObject* result = PyObject_CallMethod(pyAct,
+ const_cast<char *>("connect"),
+ const_cast<char *>("OsO"),
+ pyAct,
SIGNAL(triggered(bool)), callback);
if (result == 0 || result == Py_False) {
diff --git a/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml b/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml
index b4a6c245..11e6a9f7 100644
--- a/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml
+++ b/sources/pyside2/PySide2/QtWidgets/typesystem_widgets_common.xml
@@ -269,7 +269,7 @@
<enum-type name="PanelModality" since="4.6"/>
<inject-code class="target" position="end">
PyObject *userTypeConstant = PyInt_FromLong(QGraphicsItem::UserType);
- PyDict_SetItemString(Sbk_QGraphicsItem_Type.super.ht_type.tp_dict, "UserType", userTypeConstant);
+ PyDict_SetItemString(PepType(Sbk_QGraphicsItem_TypeF())->tp_dict, "UserType", userTypeConstant);
</inject-code>
<modify-function signature="setParentItem(QGraphicsItem*)">
<modify-argument index="this">
@@ -1022,7 +1022,11 @@
%0 = new %TYPE(%1, %2);
</inject-code>
<inject-code class="target" position="end">
- Shiboken::AutoDecRef result(PyObject_CallMethod(%PYSELF, "connect", "OsO", %PYSELF, SIGNAL(activated()), %PYARG_3));
+ Shiboken::AutoDecRef result(PyObject_CallMethod(%PYSELF,
+ const_cast&lt;char *&gt;("connect"),
+ const_cast&lt;char *&gt;("OsO"),
+ %PYSELF, SIGNAL(activated()), %PYARG_3)
+ );
if (!result.isNull())
Shiboken::Object::setParent(%PYARG_2, %PYSELF);
</inject-code>
@@ -3029,7 +3033,11 @@
<inject-code>
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));
+ Shiboken::AutoDecRef result(PyObject_CallMethod(%PYARG_0,
+ const_cast&lt;char *&gt;("connect"),
+ const_cast&lt;char *&gt;("OsO"),
+ %PYARG_0, SIGNAL(triggered()), %PYARG_3)
+ );
</inject-code>
</modify-function>
<modify-function signature="addAction(QString,const QObject*,const char*)">
@@ -3045,7 +3053,11 @@
<inject-code>
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));
+ Shiboken::AutoDecRef result(PyObject_CallMethod(%PYARG_0,
+ const_cast&lt;char *&gt;("connect"),
+ const_cast&lt;char *&gt;("OsO"),
+ %PYARG_0, SIGNAL(triggered()), %PYARG_2)
+ );
</inject-code>
</modify-function>
<modify-function signature="addAction(const QString&amp;)">