diff options
| author | Christoph Berg <myon@debian.org> | 2021-02-01 21:15:40 +0100 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2021-02-01 21:15:40 +0100 |
| commit | 2d5d428222cedf45579e48d29e8e57b5ef464fcd (patch) | |
| tree | 5fd43ef4e65c28483006a958d41413b665173c3c /main.cpp | |
| parent | 6e292338af5ca086709327332216935f131aa688 (diff) | |
| parent | 3209ca0e2d4243c861c3d1d6022ba1da4f9f2fc8 (diff) | |
Update upstream source from tag 'upstream/2.3.0+repack'
Update to upstream version '2.3.0+repack'
with Debian dir 006c3fb660cf005009969f52d0ddbe4d85faf44f
Diffstat (limited to 'main.cpp')
| -rw-r--r-- | main.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
@@ -5,7 +5,7 @@ #include <iterator> #include <algorithm> #include <ios> -#include <locale.h> +#include <locale> #include <fftw3.h> #include <QSharedMemory> @@ -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 { |
