aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/PySide6
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/PySide6')
-rw-r--r--sources/pyside6/PySide6/QtCore/typesystem_core_common.xml1
-rw-r--r--sources/pyside6/PySide6/glue/qtcore.cpp6
2 files changed, 2 insertions, 5 deletions
diff --git a/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml b/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
index e0d711313..207844c56 100644
--- a/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
+++ b/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
@@ -17,6 +17,7 @@
<include file-name="pysidemetatype.h" location="global"/>
<include file-name="pysideutils.h" location="global"/> <!-- QString conversion -->
<include file-name="signalmanager.h" location="global"/>
+ <include file-name="sbkerrors.h" location="global"/>
<!-- QtCoreHelper::QGenericReturnArgumentHolder -->
<include file-name="qtcorehelper.h" location="local"/>
</extra-includes>
diff --git a/sources/pyside6/PySide6/glue/qtcore.cpp b/sources/pyside6/PySide6/glue/qtcore.cpp
index 689946652..78a25f0a1 100644
--- a/sources/pyside6/PySide6/glue/qtcore.cpp
+++ b/sources/pyside6/PySide6/glue/qtcore.cpp
@@ -433,10 +433,7 @@ static PyObject *qtmsghandler = nullptr;
static void msgHandlerCallback(QtMsgType type, const QMessageLogContext &ctx, const QString &msg)
{
Shiboken::GilState state;
- PyObject *excType{};
- PyObject *excValue{};
- PyObject *excTraceback{};
- PyErr_Fetch(&excType, &excValue, &excTraceback);
+ Shiboken::Errors::Stash errorStash;
Shiboken::AutoDecRef arglist(PyTuple_New(3));
PyTuple_SetItem(arglist, 0, %CONVERTTOPYTHON[QtMsgType](type));
PyTuple_SetItem(arglist, 1, %CONVERTTOPYTHON[QMessageLogContext &](ctx));
@@ -444,7 +441,6 @@ static void msgHandlerCallback(QtMsgType type, const QMessageLogContext &ctx, co
const char *data = array.constData();
PyTuple_SetItem(arglist, 2, %CONVERTTOPYTHON[const char *](data));
Shiboken::AutoDecRef ret(PyObject_CallObject(qtmsghandler, arglist));
- PyErr_Restore(excType, excValue, excTraceback);
}
// @snippet qt-messagehandler