From b20eed0306d4f79c69de130d07df8671d763f50b Mon Sep 17 00:00:00 2001 From: polos Date: Wed, 28 Apr 2021 17:22:33 +0200 Subject: [PATCH] fix for running EQL5 on a separate thread (not the UI one); N.B. requires 'thread-safe.lisp' to be loaded on startup; --- src/dyn_object.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dyn_object.cpp b/src/dyn_object.cpp index 4d3faa4..88d1baf 100644 --- a/src/dyn_object.cpp +++ b/src/dyn_object.cpp @@ -13,7 +13,9 @@ int DynObject::event_filter_handle = 0; QObject* DynObject::currentSender = 0; DynObject::DynObject(QObject* par) : QObject(par), event_filters(false) { - qApp->installEventFilter(this); } + // note: QADD-EVENT-FILTER will not work if EQL5 is not running on the UI thread + if(thread() == QApplication::instance()->thread()) { + qApp->installEventFilter(this); }} int DynObject::qt_metacall(QMetaObject::Call c, int id, void** args) { if(QMetaObject::InvokeMetaMethod == c) {