From 3743287d1c03f0bdb00b84f568cd9c3e61a4b9ef Mon Sep 17 00:00:00 2001 From: oktal3700 Date: Mon, 29 Aug 2022 22:30:15 +0100 Subject: [PATCH] Fix regression in fatal log message handler Don't bypass extra handling of fatal messages when invoked in the main thread from a different thread. --- src/blackmisc/loghandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/blackmisc/loghandler.cpp b/src/blackmisc/loghandler.cpp index da66ba32a..a5c229fb2 100644 --- a/src/blackmisc/loghandler.cpp +++ b/src/blackmisc/loghandler.cpp @@ -51,7 +51,7 @@ namespace BlackMisc { // Fatal message means this thread is about to crash the application. A queued connection would be useless. // Blocking queued connection means we pause this thread just long enough to let the main thread handle the message. - QMetaObject::invokeMethod(CLogHandler::instance(), invokee, Qt::BlockingQueuedConnection); + QMetaObject::invokeMethod(CLogHandler::instance(), [ & ] { messageHandler(type, context, message); }, Qt::BlockingQueuedConnection); return; } #if defined(Q_CC_MSVC) && defined(QT_NO_DEBUG)