diff options
| author | Cristián Maureira-Fredes <cristian.maureira-fredes@qt.io> | 2020-02-06 18:32:53 +0100 |
|---|---|---|
| committer | Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> | 2020-03-13 08:15:21 +0100 |
| commit | 4106f1420119f77b41246836f1829431a1c58395 (patch) | |
| tree | c0769fbe0416421ec6d4512e57d421766ffd1c47 /sources/pyside2/PySide2/glue/qtwidgets.cpp | |
| parent | 4df39cb75da522e5daff583e6fc11ca897969628 (diff) | |
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 <Friedemann.Kleint@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/pyside2/PySide2/glue/qtwidgets.cpp')
| -rw-r--r-- | sources/pyside2/PySide2/glue/qtwidgets.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/sources/pyside2/PySide2/glue/qtwidgets.cpp b/sources/pyside2/PySide2/glue/qtwidgets.cpp index 0e0b025a6..1c663364c 100644 --- a/sources/pyside2/PySide2/glue/qtwidgets.cpp +++ b/sources/pyside2/PySide2/glue/qtwidgets.cpp @@ -93,18 +93,14 @@ _defaultValue = %PYARG_1; // @snippet qformlayout-fix-args int _row; QFormLayout::ItemRole _role; -%BEGIN_ALLOW_THREADS %CPPSELF->%FUNCTION_NAME(%ARGUMENT_NAMES, &_row, &_role); -%END_ALLOW_THREADS %PYARG_0 = PyTuple_New(2); PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[int](_row)); 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)); @@ -389,9 +385,7 @@ Shiboken::AutoDecRef parent(%CONVERTTOPYTHON[QGraphicsItem *](parentItem)); const auto &childItems = %1->childItems(); for (auto *item : childItems) Shiboken::Object::setParent(parent, %CONVERTTOPYTHON[QGraphicsItem *](item)); -%BEGIN_ALLOW_THREADS %CPPSELF.%FUNCTION_NAME(%1); -%END_ALLOW_THREADS // the arg was destroyed by Qt. Shiboken::Object::invalidate(%PYARG_1); // @snippet qgraphicsscene-destroyitemgroup |
