aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/libpyside
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2017-11-30 16:10:23 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2017-11-30 15:14:25 +0000
commit57af6dfbd56f4f90950e84a4b4cf8d3caedae95a (patch)
tree7dd4abb1c11b2c45aabc6fde1f28f0659a0f069d /sources/pyside2/libpyside
parent7e734adb5d4e02eb1a50052473ac236c14e34862 (diff)
libpyside: Fix code forwarding Python exceptions to JS
Change-Id: I6dffab506814e1d33812ed23b3e3920882b6c4e6 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'sources/pyside2/libpyside')
-rw-r--r--sources/pyside2/libpyside/signalmanager.cpp.in18
1 files changed, 4 insertions, 14 deletions
diff --git a/sources/pyside2/libpyside/signalmanager.cpp.in b/sources/pyside2/libpyside/signalmanager.cpp.in
index 8ede0961..08c57c21 100644
--- a/sources/pyside2/libpyside/signalmanager.cpp.in
+++ b/sources/pyside2/libpyside/signalmanager.cpp.in
@@ -471,24 +471,14 @@ int SignalManager::qt_metacall(QObject* object, QMetaObject::Call call, int id,
if (data && !data->jsWrapper.isNullOrUndefined()) {
QV4::ExecutionEngine *engine = data->jsWrapper.engine();
-
-#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
- QV4::Heap::ExecutionContext *ctx = engine->current;
-#elif QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
- QV4::Heap::ExecutionContext *ctx = engine->currentContext();
+#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)
+ if (engine->currentStackFrame != nullptr) {
+#elif QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
+ if (engine->currentContext->d() != engine->rootContext()->d()) {
#else
QV4::ExecutionContext *ctx = engine->currentContext();
-#endif
-
-#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
if (ctx->type == QV4::Heap::ExecutionContext::Type_CallContext ||
ctx->type == QV4::Heap::ExecutionContext::Type_SimpleCallContext) {
-#elif QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
- if (ctx->d()->type == QV4::ExecutionContext::Type_CallContext ||
- ctx->d()->type == QV4::ExecutionContext::Type_SimpleCallContext) {
-#else
- if (ctx->type == QV4::ExecutionContext::Type_CallContext ||
- ctx->type == QV4::ExecutionContext::Type_SimpleCallContext) {
#endif
PyObject *errType, *errValue, *errTraceback;
PyErr_Fetch(&errType, &errValue, &errTraceback);