mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-30 22:29:13 +08:00
refs #362 Workaround for X-Plane's locale issues
Set original X-Plane's locale back after calling QCoreApplication's constructor.
This commit is contained in:
@@ -99,7 +99,17 @@ public:
|
|||||||
{
|
{
|
||||||
static int argc = 1;
|
static int argc = 1;
|
||||||
static char *argv[] = { strdup("X-Plane") };
|
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);
|
new QSharedApplication(ptr, argc, argv);
|
||||||
|
|
||||||
|
#ifdef Q_OS_UNIX
|
||||||
|
setlocale(LC_ALL, xplocale);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
if (! instance()->inherits("QSharedApplication"))
|
if (! instance()->inherits("QSharedApplication"))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user