aboutsummaryrefslogtreecommitdiffstats
path: root/PySide/typesystem_templates.xml
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-03-21 15:11:03 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:54:04 -0300
commit44f5f6261876d508d52826534f7f77270c2b31ce (patch)
tree8fce06b80b59b5714cc56ef8e102ce94933c5c4e /PySide/typesystem_templates.xml
parent69abc806ec895239154287779dca9c4cac8adcea (diff)
Fix bug 728 - "QFileDialog.getOpenFileNames never returns (hangs)"
Reviewer: Lauro Moura <lauro.neto@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'PySide/typesystem_templates.xml')
-rw-r--r--PySide/typesystem_templates.xml38
1 files changed, 38 insertions, 0 deletions
diff --git a/PySide/typesystem_templates.xml b/PySide/typesystem_templates.xml
index e13b78d9e..9ef317d55 100644
--- a/PySide/typesystem_templates.xml
+++ b/PySide/typesystem_templates.xml
@@ -31,47 +31,65 @@
<!-- Templates to fix bool* parameters -->
<template name="fix_bool*">
bool ok_;
+ PyThreadState* _save = PyEval_SaveThread(); // Py_BEGIN_ALLOW_THREADS
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(&amp;ok_);
+ PyEval_RestoreThread(_save); // Py_END_ALLOW_THREADS
%PYARG_0 = Shiboken::makeTuple(retval_, ok_);
</template>
<template name="fix_args,bool*">
bool ok_;
+ PyThreadState* _save = PyEval_SaveThread(); // Py_BEGIN_ALLOW_THREADS
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &amp;ok_);
+ PyEval_RestoreThread(_save); // Py_END_ALLOW_THREADS
%PYARG_0 = Shiboken::makeTuple(retval_, ok_);
</template>
<template name="fix_arg,bool*,arg">
bool ok_;
+ PyThreadState* _save = PyEval_SaveThread(); // Py_BEGIN_ALLOW_THREADS
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(%1, &amp;ok_, %3);
+ PyEval_RestoreThread(_save); // Py_END_ALLOW_THREADS
%PYARG_0 = Shiboken::makeTuple(retval_, ok_);
</template>
<template name="fix_bool*,arg">
bool ok_;
+ PyThreadState* _save = PyEval_SaveThread(); // Py_BEGIN_ALLOW_THREADS
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(&amp;ok_, %2);
+ PyEval_RestoreThread(_save); // Py_END_ALLOW_THREADS
%PYARG_0 = Shiboken::makeTuple(retval_, ok_);
</template>
<template name="fix_bool*,arg,arg">
bool ok_;
+ PyThreadState* _save = PyEval_SaveThread(); // Py_BEGIN_ALLOW_THREADS
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(&amp;ok_, %2, %3);
+ PyEval_RestoreThread(_save); // Py_END_ALLOW_THREADS
%PYARG_0 = Shiboken::makeTuple(retval_, ok_);
</template>
<template name="fix_bool*,arg,arg,arg">
bool ok_;
+ PyThreadState* _save = PyEval_SaveThread(); // Py_BEGIN_ALLOW_THREADS
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(&amp;ok_, %2, %3, %4);
+ PyEval_RestoreThread(_save); // Py_END_ALLOW_THREADS
%PYARG_0 = Shiboken::makeTuple(retval_, ok_);
</template>
<template name="fix_arg,arg,arg,arg,arg,arg,arg,bool*,arg">
bool ok_;
+ PyThreadState* _save = PyEval_SaveThread(); // Py_BEGIN_ALLOW_THREADS
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(%1, %2, %3, %4, %5, %6, %7, &amp;ok_, %9);
+ PyEval_RestoreThread(_save); // Py_END_ALLOW_THREADS
%PYARG_0 = Shiboken::makeTuple(retval_, ok_);
</template>
<template name="fix_arg,arg,arg,arg,arg,arg,bool*,arg">
bool ok_;
+ PyThreadState* _save = PyEval_SaveThread(); // Py_BEGIN_ALLOW_THREADS
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(%1, %2, %3, %4, %5, %6, &amp;ok_, %8);
+ PyEval_RestoreThread(_save); // Py_END_ALLOW_THREADS
%PYARG_0 = Shiboken::makeTuple(retval_, ok_);
</template>
<template name="fix_arg,arg,arg,arg,arg,bool*,arg">
bool ok_;
+ PyThreadState* _save = PyEval_SaveThread(); // Py_BEGIN_ALLOW_THREADS
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(%1, %2, %3, %4, %5, &amp;ok_, %7);
+ PyEval_RestoreThread(_save); // Py_END_ALLOW_THREADS
%PYARG_0 = Shiboken::makeTuple(retval_, ok_);
</template>
<template name="get_slice">
@@ -102,37 +120,49 @@
<template name="fix_args,QRectF*">
QRectF rect_;
+ PyThreadState* _save = PyEval_SaveThread(); // Py_BEGIN_ALLOW_THREADS
%CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &amp;rect_);
+ PyEval_RestoreThread(_save); // Py_END_ALLOW_THREADS
%PYARG_0 = %CONVERTTOPYTHON[QRectF](rect_);
</template>
<template name="fix_args,QRect*">
QRect rect_;
+ PyThreadState* _save = PyEval_SaveThread(); // Py_BEGIN_ALLOW_THREADS
%CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &amp;rect_);
+ PyEval_RestoreThread(_save); // Py_END_ALLOW_THREADS
%PYARG_0 = %CONVERTTOPYTHON[QRect](rect_);
</template>
<template name="fix_char*">
char val_;
+ PyThreadState* _save = PyEval_SaveThread(); // Py_BEGIN_ALLOW_THREADS
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(&amp;val_);
+ PyEval_RestoreThread(_save); // Py_END_ALLOW_THREADS
%PYARG_0 = Shiboken::makeTuple(retval_, val_);
</template>
<template name="fix_int*,int*,int*,int*">
int a, b, c, d;
+ PyThreadState* _save = PyEval_SaveThread(); // Py_BEGIN_ALLOW_THREADS
%CPPSELF.%FUNCTION_NAME(&amp;a, &amp;b, &amp;c, &amp;d);
+ PyEval_RestoreThread(_save); // Py_END_ALLOW_THREADS
%PYARG_0 = Shiboken::makeTuple(a, b, c, d);
</template>
<template name="fix_qreal*,qreal*,qreal*,qreal*">
qreal a, b, c, d;
+ PyThreadState* _save = PyEval_SaveThread(); // Py_BEGIN_ALLOW_THREADS
%CPPSELF.%FUNCTION_NAME(&amp;a, &amp;b, &amp;c, &amp;d);
+ PyEval_RestoreThread(_save); // Py_END_ALLOW_THREADS
%PYARG_0 = Shiboken::makeTuple(a, b, c, d);
</template>
<template name="fix_int*,int*,int*,int*,int*">
int a, b, c, d, e;
+ PyThreadState* _save = PyEval_SaveThread(); // Py_BEGIN_ALLOW_THREADS
%CPPSELF.%FUNCTION_NAME(&amp;a, &amp;b, &amp;c, &amp;d, &amp;e);
+ PyEval_RestoreThread(_save); // Py_END_ALLOW_THREADS
%PYARG_0 = Shiboken::makeTuple(a, b, c, d, e);
</template>
<template name="fix_qreal*,qreal*,qreal*,qreal*,qreal*">
@@ -151,7 +181,9 @@
<template name="fix_return_args,int*">
RETURNTYPE _ret;
int _arg;
+ PyThreadState* _save = PyEval_SaveThread(); // Py_BEGIN_ALLOW_THREADS
_ret = %CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &amp;_arg);
+ PyEval_RestoreThread(_save); // Py_END_ALLOW_THREADS
%PYARG_0 = Shiboken::makeTuple(_ret, _arg);
</template>
@@ -165,7 +197,9 @@
<template name="fix_arg,int*,int*">
%RETURN_TYPE _ret;
int a, b;
+ PyThreadState* _save = PyEval_SaveThread(); // Py_BEGIN_ALLOW_THREADS
_ret = %CPPSELF.%FUNCTION_NAME(%1, &amp;a, &amp;b);
+ PyEval_RestoreThread(_save); // Py_END_ALLOW_THREADS
%PYARG_0 = Shiboken::makeTuple(_ret, a, b);
</template>
@@ -174,12 +208,16 @@
</template>
<template name="return_tuple_QValidator_QString_int">
+ PyThreadState* _save = PyEval_SaveThread(); // Py_BEGIN_ALLOW_THREADS
%RETURN_TYPE retval_ = %RETURN_TYPE(%CPPSELF.%FUNCTION_NAME(%1, %2));
+ PyEval_RestoreThread(_save); // Py_END_ALLOW_THREADS
%PYARG_0 = Shiboken::makeTuple(retval_, %1, %2);
</template>
<template name="return_for_QFileDialog">
+ PyThreadState* _save = PyEval_SaveThread(); // Py_BEGIN_ALLOW_THREADS
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(%1, %2, %3, %4, %5, %6);
+ PyEval_RestoreThread(_save); // Py_END_ALLOW_THREADS
%PYARG_0 = Shiboken::makeTuple(retval_, %4);
</template>
<template name="set_qapp_parent_for_orphan">