X-Git-Url: https://vaikene.ee/gitweb/pswgen09.html?a=blobdiff_plain;f=src%2Fmain%2FCLI%2Fmain.cpp;h=c795bbaa9603390a4ecb75b285e61a14e7f0debf;hb=de270ece1b764b19968e14420f538321f1c06b15;hp=0c3cbb65d597548617cb14500c21d561306297f8;hpb=8958311b9f05fc65cdf9e528db8b4b32a94eb24a;p=evaf diff --git a/src/main/CLI/main.cpp b/src/main/CLI/main.cpp index 0c3cbb6..c795bba 100644 --- a/src/main/CLI/main.cpp +++ b/src/main/CLI/main.cpp @@ -49,7 +49,7 @@ namespace Internal { * * This function outputs messages to the console and to the log file. */ -static void messageOutput(QtMsgType type, char const * const msg) +static void messageOutput(QtMsgType type, QMessageLogContext const &, QString const & msg) { static bool inHandler = false; @@ -92,13 +92,12 @@ static void messageOutput(QtMsgType type, char const * const msg) * If the critical error message is shown, then the user has an option to ignore the error. In this * case the application is not terminated. */ -static void fatalMsgHandler(QString const & msg, QString const & source, QString const & where) +[[noreturn]] static void fatalMsgHandler(QString const & msg, QString const & source, QString const & where) { -#ifdef Q_OS_LINUX - abort(); -#else + Q_UNUSED(msg); + Q_UNUSED(source); + Q_UNUSED(where); exit(1); -#endif } } // namespace eVaf::CLI::Internal @@ -238,7 +237,7 @@ int main(int argc, char ** argv) // Install our onw message handlers Common::iLogger::instance()->installFatalMsgHandler(Internal::fatalMsgHandler); - qInstallMsgHandler(Internal::messageOutput); + qInstallMessageHandler(Internal::messageOutput); // Process command-line arguments if (!Application::processCommandLine(argc, argv))