summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2011-04-28 14:50:25 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:54:16 -0300
commit8d6761b93d82f59b8a75af59043eecbbf16ec9c6 (patch)
tree474a4514e05cdeb1410f9ac49581d949b5a48a95
parentb2ddb6c1cd46f6e56962fd64731aaa6a85a36855 (diff)
Fixed QFileDialog functions which used QString as pointer to return values
Fixes bug #819 Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Hugo Parente Lima <hugo.pl@gmail.com>
-rw-r--r--PySide/QtGui/typesystem_gui_common.xml21
-rw-r--r--PySide/typesystem_templates.xml4
2 files changed, 14 insertions, 11 deletions
diff --git a/PySide/QtGui/typesystem_gui_common.xml b/PySide/QtGui/typesystem_gui_common.xml
index 6f508651..06012965 100644
--- a/PySide/QtGui/typesystem_gui_common.xml
+++ b/PySide/QtGui/typesystem_gui_common.xml
@@ -4344,34 +4344,37 @@
<modify-argument index="return">
<replace-type modified-type="(fileNames, selectedFilter)"/>
</modify-argument>
+ <modify-argument index="5">
+ <replace-type modified-type="QString"/>
+ <replace-default-expression with="QString()"/>
+ </modify-argument>
<inject-code class="target" position="end">
<insert-template name="return_for_QFileDialog"/>
</inject-code>
- <modify-argument index="5">
- <remove-argument/>
- </modify-argument>
</modify-function>
<modify-function signature="getOpenFileName(QWidget*, const QString&amp;, const QString&amp;, const QString&amp;, QString*, QFlags&lt;QFileDialog::Option&gt;)" allow-thread="yes">
<modify-argument index="return">
<replace-type modified-type="(fileName, selectedFilter)"/>
</modify-argument>
+ <modify-argument index="5">
+ <replace-type modified-type="QString"/>
+ <replace-default-expression with="QString()"/>
+ </modify-argument>
<inject-code class="target" position="end">
<insert-template name="return_for_QFileDialog"/>
</inject-code>
- <modify-argument index="5">
- <remove-argument/>
- </modify-argument>
</modify-function>
<modify-function signature="getSaveFileName(QWidget*, const QString&amp;, const QString&amp;, const QString&amp;, QString*, QFlags&lt;QFileDialog::Option&gt;)" allow-thread="yes">
<modify-argument index="return">
<replace-type modified-type="(fileName, selectedFilter)"/>
</modify-argument>
+ <modify-argument index="5">
+ <replace-type modified-type="QString"/>
+ <replace-default-expression with="QString()"/>
+ </modify-argument>
<inject-code class="target" position="end">
<insert-template name="return_for_QFileDialog"/>
</inject-code>
- <modify-argument index="5">
- <remove-argument/>
- </modify-argument>
</modify-function>
<modify-function signature="getExistingDirectory(QWidget*, const QString&amp;, const QString&amp;, QFlags&lt;QFileDialog::Option>)" allow-thread="yes" />
</object-type>
diff --git a/PySide/typesystem_templates.xml b/PySide/typesystem_templates.xml
index 8d5390b5..5c0f1ef3 100644
--- a/PySide/typesystem_templates.xml
+++ b/PySide/typesystem_templates.xml
@@ -241,9 +241,9 @@
<template name="return_for_QFileDialog">
%BEGIN_ALLOW_THREADS
- %RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(%1, %2, %3, %4, %5, %6);
+ %RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(%1, %2, %3, %4, &amp;%5, %6);
%END_ALLOW_THREADS
- %PYARG_0 = Shiboken::makeTuple(retval_, %4);
+ %PYARG_0 = Shiboken::makeTuple(retval_, %5);
</template>
<template name="set_qapp_parent_for_orphan">
SbkObject* _pySelf = reinterpret_cast&lt;SbkObject*&gt;(%PYARG_0);