From 4106f1420119f77b41246836f1829431a1c58395 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristi=C3=A1n=20Maureira-Fredes?= Date: Thu, 6 Feb 2020 18:32:53 +0100 Subject: Adjust the allow-thread behavior This adds and remove the usage of: allow-thread="yes" in some typesystem entries. This also adapt the usage of the Py_BEGIN/END_ALLOW_THREAD macro inside the snippets used by other typesystem entries. The main reason is that in some cases not the whole snippet requires to be inside such state, but only when calling the C++ equivalent function. Task-number: PYSIDE-803 Change-Id: Ifa9c8cee2713c453e4d5c624aaa862e75559180c Reviewed-by: Friedemann Kleint Reviewed-by: Christian Tismer --- sources/pyside2/PySide2/glue/qtgui.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'sources/pyside2/PySide2/glue/qtgui.cpp') diff --git a/sources/pyside2/PySide2/glue/qtgui.cpp b/sources/pyside2/PySide2/glue/qtgui.cpp index d2480e99e..a6b45b7c0 100644 --- a/sources/pyside2/PySide2/glue/qtgui.cpp +++ b/sources/pyside2/PySide2/glue/qtgui.cpp @@ -78,9 +78,7 @@ QBitmap %0 = QBitmap::fromData(%1, buffer, %3); // @snippet qbitmap-fromdata // @snippet qtextline-cursortox -%BEGIN_ALLOW_THREADS %RETURN_TYPE %0 = %CPPSELF->::%TYPE::%FUNCTION_NAME(&%1, %2); -%END_ALLOW_THREADS %PYARG_0 = PyTuple_New(2); PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[%RETURN_TYPE](%0)); PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[%ARG1_TYPE](%1)); @@ -444,9 +442,7 @@ PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[%ARG1_TYPE](%1)); // @snippet qclipboard-text // @snippet qpainter-drawpolygon -%BEGIN_ALLOW_THREADS %CPPSELF.%FUNCTION_NAME(%1.data(), %1.size(), %2); -%END_ALLOW_THREADS // @snippet qpainter-drawpolygon // @snippet qmatrix-map-point -- cgit v1.2.3