aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/libpyside/dynamicslot.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/libpyside/dynamicslot.cpp')
-rw-r--r--sources/pyside6/libpyside/dynamicslot.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/sources/pyside6/libpyside/dynamicslot.cpp b/sources/pyside6/libpyside/dynamicslot.cpp
index ce8ed191c..1fbdba1ab 100644
--- a/sources/pyside6/libpyside/dynamicslot.cpp
+++ b/sources/pyside6/libpyside/dynamicslot.cpp
@@ -65,6 +65,10 @@ void CallbackDynamicSlot::call(const QByteArrayList &parameterTypes, const char
void **cppArgs)
{
SignalManager::callPythonMetaMethod(parameterTypes, returnType, cppArgs, m_callback);
+ // SignalManager::callPythonMetaMethod might have failed, in that case we have to print the
+ // error so it considered "handled".
+ if (PyErr_Occurred() != nullptr)
+ SignalManager::handleMetaCallError();
}
void CallbackDynamicSlot::formatDebug(QDebug &debug) const
@@ -116,6 +120,10 @@ void MethodDynamicSlot::call(const QByteArrayList &parameterTypes, const char *r
m_pythonSelf, nullptr));
SignalManager::callPythonMetaMethod(parameterTypes, returnType,
cppArgs, callable.object());
+ // SignalManager::callPythonMetaMethod might have failed, in that case we have to print the
+ // error so it considered "handled".
+ if (PyErr_Occurred() != nullptr)
+ SignalManager::handleMetaCallError();
}
void MethodDynamicSlot::formatDebug(QDebug &debug) const