From 3209ca0e2d4243c861c3d1d6022ba1da4f9f2fc8 Mon Sep 17 00:00:00 2001 From: Christoph Berg Date: Mon, 1 Feb 2021 21:14:58 +0100 Subject: New upstream version 2.3.0+repack --- main.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'main.cpp') diff --git a/main.cpp b/main.cpp index c6dd0ccb..0960789e 100644 --- a/main.cpp +++ b/main.cpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include @@ -115,7 +115,7 @@ int main(int argc, char *argv[]) auto const env = QProcessEnvironment::systemEnvironment (); - QApplication a(argc, argv); + ExceptionCatchingApplication a(argc, argv); try { // LOG_INfO ("+++++++++++++++++++++++++++ Resources ++++++++++++++++++++++++++++"); @@ -129,10 +129,13 @@ int main(int argc, char *argv[]) // LOG_INFO ("--------------------------- Resources ----------------------------"); QLocale locale; // get the current system locale - setlocale (LC_NUMERIC, "C"); // ensure number forms are in - // consistent format, do this after - // instantiating QApplication so - // that GUI has correct l18n + + // Set C/C++ locale used for logging etc. +#if defined (Q_OS_WIN) + std::locale::global (std::locale ("C")); +#else + std::locale::global (std::locale ("en_US.UTF-8")); +#endif // Override programs executable basename as application name. a.setApplicationName ("WSJT-X"); @@ -397,7 +400,7 @@ int main(int argc, char *argv[]) a.translate ("main", "Unable to create shared memory segment")); throw std::runtime_error {"Shared memory error"}; } - LOG_INFO ("shmem size:" << mem_jt9.size ()); + LOG_INFO ("shmem size: " << mem_jt9.size ()); } else { -- cgit v1.2.3