diff options
Diffstat (limited to 'sources/pyside2/libpyside/signalmanager.cpp.in')
-rw-r--r-- | sources/pyside2/libpyside/signalmanager.cpp.in | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/sources/pyside2/libpyside/signalmanager.cpp.in b/sources/pyside2/libpyside/signalmanager.cpp.in index 8ede09610..08c57c218 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); |