diff options
| author | Christoph Berg <myon@debian.org> | 2021-02-01 21:14:58 +0100 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2021-02-01 21:14:58 +0100 |
| commit | 3209ca0e2d4243c861c3d1d6022ba1da4f9f2fc8 (patch) | |
| tree | ac0af2c5602184ab3920f1242860945ec6b43bd7 /main.cpp | |
| parent | 1c1cf517cea41515f4123691f571b038a53c700b (diff) | |
New upstream version 2.3.0+repackupstream/2.3.0+repack
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 { |
