aboutsummaryrefslogtreecommitdiffstats
path: root/PySide
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2011-04-13 18:26:00 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:54:11 -0300
commiteed7193f32218465381ddb5c0310585006674add (patch)
tree182a1903b3c1ce3ae6940978d813f76edc7fca02 /PySide
parent6efe441b766852764c4638f41b5ae556c93a9aa8 (diff)
Fixes bug #742 - Method "void QPrinter::getPageMargins(qreal*,qreal*,qreal*,qreal*,Unit) const" missing
Also added unit tests. http://bugs.pyside.org/show_bug.cgi?id=742
Diffstat (limited to 'PySide')
-rw-r--r--PySide/QtGui/typesystem_gui_common.xml24
-rw-r--r--PySide/typesystem_templates.xml8
2 files changed, 30 insertions, 2 deletions
diff --git a/PySide/QtGui/typesystem_gui_common.xml b/PySide/QtGui/typesystem_gui_common.xml
index 37cfae409..f455d64b0 100644
--- a/PySide/QtGui/typesystem_gui_common.xml
+++ b/PySide/QtGui/typesystem_gui_common.xml
@@ -6410,8 +6410,28 @@
<enum-type name="PrinterMode"/>
<enum-type name="PrinterState"/>
<enum-type name="Unit"/>
- <!-- ### See bug 742 -->
- <modify-function signature="getPageMargins(qreal*,qreal*,qreal*,qreal*,QPrinter::Unit)const" remove="all" />
+ <modify-function signature="getPageMargins(qreal*,qreal*,qreal*,qreal*,QPrinter::Unit)const">
+ <modify-argument index="0">
+ <replace-type modified-type="PyObject" />
+ </modify-argument>
+ <modify-argument index="1">
+ <remove-argument/>
+ </modify-argument>
+ <modify-argument index="2">
+ <remove-argument/>
+ </modify-argument>
+ <modify-argument index="3">
+ <remove-argument/>
+ </modify-argument>
+ <modify-argument index="4">
+ <remove-argument/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_number*,number*,number*,number*,args">
+ <replace from="$TYPE" to="qreal" />
+ </insert-template>
+ </inject-code>
+ </modify-function>
<modify-function signature="setEngines(QPrintEngine*,QPaintEngine*)">
<modify-argument index="1">
<parent index="this" action="add"/>
diff --git a/PySide/typesystem_templates.xml b/PySide/typesystem_templates.xml
index 81aa2eaca..0f0e934bd 100644
--- a/PySide/typesystem_templates.xml
+++ b/PySide/typesystem_templates.xml
@@ -150,6 +150,14 @@
%PYARG_0 = Shiboken::makeTuple(a, b, c, d);
</template>
+ <template name="fix_number*,number*,number*,number*,args">
+ $TYPE a, b, c, d;
+ %BEGIN_ALLOW_THREADS
+ %CPPSELF->::%TYPE::%FUNCTION_NAME(&amp;a, &amp;b, &amp;c, &amp;d, %ARGUMENT_NAMES);
+ %END_ALLOW_THREADS
+ %PYARG_0 = Shiboken::makeTuple(a, b, c, d);
+ </template>
+
<template name="fix_native_return_number*,number*,number*,number*">
PyObject* _obj = %PYARG_0.object();
if (!PySequence_Check(_obj)