Added support to shortcut named arg on QAction constructor.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
This commit is contained in:
Renato Filho 2010-08-03 11:45:53 -03:00
commit b0edd53c11

View file

@ -4251,22 +4251,33 @@
<parent index="this" action="add"/> <parent index="this" action="add"/>
</modify-argument> </modify-argument>
</modify-function> </modify-function>
<add-function signature="QAction(const QString&amp;, QObject*, PyObject*)"> <add-function signature="QAction(const QString&amp;, QObject*, const QKeySequence&amp;, PyObject*)">
<!-- NOT use this for now Fix bug #???
<modify-argument index="2"> <modify-argument index="2">
<replace-default-expression with="0"/> <replace-default-expression with="0"/>
<rename to="parent"/> <rename to="parent"/>
</modify-argument> </modify-argument>
-->
<modify-argument index="3"> <modify-argument index="3">
<replace-default-expression with="QKeySequence()"/>
<rename to="shortcut"/>
</modify-argument>
<modify-argument index="4">
<replace-default-expression with="0"/> <replace-default-expression with="0"/>
<rename to="triggered"/> <rename to="triggered"/>
</modify-argument> </modify-argument>
<inject-code class="target" position="beginning"> <inject-code class="target" position="beginning">
%0 = new QActionWrapper(%1, %2); %0 = new QActionWrapper(%1, %2);
%0->setShortcut(%3);
</inject-code> </inject-code>
<inject-code class="target" position="end"> <inject-code class="target" position="end">
if (%PYARG_3 != Py_None) if (%PYARG_4 != Py_None)
Shiboken::AutoDecRef result(PyObject_CallMethod(%PYSELF, "connect", "OsO", %PYSELF, SIGNAL(triggered(bool)), %PYARG_3)); Shiboken::AutoDecRef result(PyObject_CallMethod(%PYSELF, "connect", "OsO", %PYSELF, SIGNAL(triggered(bool)), %PYARG_4));
</inject-code> </inject-code>
</add-function> </add-function>
</object-type> </object-type>