aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCristián Maureira-Fredes <Cristian.Maureira-Fredes@qt.io>2022-01-24 12:45:25 +0100
committerChristian Tismer <tismer@stackless.com>2022-01-24 18:29:23 +0000
commit9b4d1f76128bc46a5ea85d33ce67f81029b8017e (patch)
treeb223ac95f46f9e7a6a52143ef35a482c8375020a
parent60a797c9959a6ae3e18b68b7ff06ffad0a2c6f5e (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 Pick-to: 6.2 Change-Id: Ifb06e8726fece6a9b8248bc91e7616101a8a99a2 Reviewed-by: Christian Tismer <tismer@stackless.com>
-rw-r--r--sources/pyside6/PySide6/glue/qtwidgets.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/sources/pyside6/PySide6/glue/qtwidgets.cpp b/sources/pyside6/PySide6/glue/qtwidgets.cpp
index c2c787c68..7511e89cc 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));