diff options
| author | Cristian Maureira-Fredes <Cristian.Maureira-Fredes@qt.io> | 2021-04-06 22:16:57 +0200 |
|---|---|---|
| committer | Cristian Maureira-Fredes <Cristian.Maureira-Fredes@qt.io> | 2021-05-04 15:24:45 +0200 |
| commit | 62acb997f7fce1ae922e3a9995272c78353048b9 (patch) | |
| tree | bc0eaef89232aebc83bf37152e5373e408020ffd /sources/pyside6/PySide6/glue/qtprintsupport.cpp | |
| parent | d8bdd91bb6941f421d5fb0ac0ae20f10d43ff9ff (diff) | |
Enable the exec() functions
With Qt6, PySide dropped support for Python 2.7,
thus it does not make sense to keep our exec_() renaming inplace.
This patch will enable the exec() functions,
and adds a deprecation note for exec_(), which will enable us
to safely remove it in the future.
Change-Id: I7375e10632e7ab534ca264304a5a65f380b9b1bb
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/pyside6/PySide6/glue/qtprintsupport.cpp')
| -rw-r--r-- | sources/pyside6/PySide6/glue/qtprintsupport.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sources/pyside6/PySide6/glue/qtprintsupport.cpp b/sources/pyside6/PySide6/glue/qtprintsupport.cpp index 300a498c0..acd8eb4e2 100644 --- a/sources/pyside6/PySide6/glue/qtprintsupport.cpp +++ b/sources/pyside6/PySide6/glue/qtprintsupport.cpp @@ -41,3 +41,16 @@ bool out = %CPPSELF.setPageSize(%1); %PYARG_0 = %CONVERTTOPYTHON[bool](out); // @snippet setpagesize + +// @snippet exec +if (PyErr_WarnEx(PyExc_DeprecationWarning, + "'exec_' will be removed in the future. " + "Use 'exec' instead.", + 1)) { + return nullptr; +} +%BEGIN_ALLOW_THREADS +int cppResult = %CPPSELF.exec(); +%END_ALLOW_THREADS +%PYARG_0 = %CONVERTTOPYTHON[int](cppResult); +// @snippet exec |
