diff options
author | Cristián Maureira-Fredes <Cristian.Maureira-Fredes@qt.io> | 2022-01-24 12:45:25 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-01-24 22:51:05 +0000 |
commit | 7d79c67d943d8b97394317a96bd0d7c257566cef (patch) | |
tree | 89fbdf33c39632143b28044a022c039e39714496 | |
parent | 8c17e3a19f436bb1d309e0c36c79f00a90971488 (diff) |
QFileDialog: allow threads with modal dialogs
The snippets that were used to get the return from
a QFileDialog modal call was blocking, so we explicitly
allow threads around the C++ call.
Fixes: PYSIDE-1792
Change-Id: Ifb06e8726fece6a9b8248bc91e7616101a8a99a2
Reviewed-by: Christian Tismer <tismer@stackless.com>
(cherry picked from commit 9b4d1f76128bc46a5ea85d33ce67f81029b8017e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | sources/pyside6/PySide6/glue/qtwidgets.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sources/pyside6/PySide6/glue/qtwidgets.cpp b/sources/pyside6/PySide6/glue/qtwidgets.cpp index 802a3c172..f80442cc8 100644 --- a/sources/pyside6/PySide6/glue/qtwidgets.cpp +++ b/sources/pyside6/PySide6/glue/qtwidgets.cpp @@ -100,7 +100,9 @@ PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[QFormLayout::ItemRole](_role)); // @snippet qformlayout-fix-args // @snippet qfiledialog-return +%BEGIN_ALLOW_THREADS %RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(%1, %2, %3, %4, &%5, %6); +%END_ALLOW_THREADS %PYARG_0 = PyTuple_New(2); PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[%RETURN_TYPE](retval_)); PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[%ARG5_TYPE](%5)); |