From 025c268f91ee1deab17891f00dc8c90c4770224f Mon Sep 17 00:00:00 2001 From: saturneric Date: Thu, 19 Oct 2023 18:51:20 +0800 Subject: fix: improve the stability of thread system --- src/ui/GpgFrontendApplication.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/ui/GpgFrontendApplication.cpp') diff --git a/src/ui/GpgFrontendApplication.cpp b/src/ui/GpgFrontendApplication.cpp index 21932f44..83866c0d 100644 --- a/src/ui/GpgFrontendApplication.cpp +++ b/src/ui/GpgFrontendApplication.cpp @@ -73,9 +73,8 @@ GpgFrontendApplication *GpgFrontendApplication::GetInstance(int argc, } bool GpgFrontendApplication::notify(QObject *receiver, QEvent *event) { - bool app_done = true; try { - app_done = QApplication::notify(receiver, event); + return QApplication::notify(receiver, event); } catch (const std::exception &ex) { SPDLOG_ERROR("exception was caught in notify: {}", ex.what()); SPDLOG_ERROR("stacktrace of the exception: {}", @@ -97,7 +96,7 @@ bool GpgFrontendApplication::notify(QObject *receiver, QEvent *event) { "serious problem, it may be the negligence of the programmer, " "please report this problem if you can.")); } - return app_done; + return -1; } } // namespace GpgFrontend::UI -- cgit v1.2.3