From c1eb1e5ae1843b4d4781fc39c8edaf362943c78e Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sat, 12 Jan 2019 15:56:29 -0800 Subject: [PATCH] Qt: Ensure FATAL logs reach log view --- CHANGES | 1 + src/platform/qt/CoreController.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 242f4427c..82d01ed78 100644 --- a/CHANGES +++ b/CHANGES @@ -145,6 +145,7 @@ Bugfixes: - SDL: Fix handling of invalid gamepads (fixes mgba.io/i/1239) - Libretro: Fix adding codes with hooks - GBA: Fix GB Player features + - Qt: Ensure FATAL logs reach log view Misc: - mGUI: Add SGB border configuration option - mGUI: Add support for different settings types diff --git a/src/platform/qt/CoreController.cpp b/src/platform/qt/CoreController.cpp index e16e1c5da..1c848ab4b 100644 --- a/src/platform/qt/CoreController.cpp +++ b/src/platform/qt/CoreController.cpp @@ -185,12 +185,12 @@ CoreController::CoreController(mCore* core, QObject* parent) message = QString().vsprintf(format, args); QMetaObject::invokeMethod(controller, "statusPosted", Q_ARG(const QString&, message)); } + message = QString().vsprintf(format, args); + QMetaObject::invokeMethod(controller, "logPosted", Q_ARG(int, level), Q_ARG(int, category), Q_ARG(const QString&, message)); if (level == mLOG_FATAL) { mCoreThreadMarkCrashed(controller->thread()); QMetaObject::invokeMethod(controller, "crashed", Q_ARG(const QString&, QString().vsprintf(format, args))); } - message = QString().vsprintf(format, args); - QMetaObject::invokeMethod(controller, "logPosted", Q_ARG(int, level), Q_ARG(int, category), Q_ARG(const QString&, message)); }; }