From 3acc473612aae353e23b8100c3e542171913fb4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Garapich?= Date: Wed, 7 Jan 2015 23:47:42 +0100 Subject: [PATCH] refs #362 Workaround for X-Plane's locale issues Set original X-Plane's locale back after calling QCoreApplication's constructor. --- src/xbus/utils.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/xbus/utils.h b/src/xbus/utils.h index 5ec565b18..5819326fa 100644 --- a/src/xbus/utils.h +++ b/src/xbus/utils.h @@ -99,7 +99,17 @@ public: { static int argc = 1; static char *argv[] = { strdup("X-Plane") }; + +#ifdef Q_OS_UNIX + /* Workaround for #362 */ + char* xplocale = setlocale(LC_ALL, nullptr); +#endif + new QSharedApplication(ptr, argc, argv); + +#ifdef Q_OS_UNIX + setlocale(LC_ALL, xplocale); +#endif } if (! instance()->inherits("QSharedApplication")) {