From 5c8c4d0b2127a5110e05fa4afa1b8883cc91a5df Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Tue, 24 Nov 2015 14:12:04 +0100 Subject: [PATCH] Don't call setlocale(3) in bootstrap code When bootstrapping we might rely on sscanf(3) for parsing doubles from strings. We don't want this to be localized. Task-number: QTBUG-49616 Change-Id: I1607bb750b479fd7007dd0d875d600be59caa859 Reviewed-by: Eskil Abrahamsen Blomfeldt Reviewed-by: Lars Knoll --- src/corelib/kernel/qcoreapplication.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index e64ee04134..361bc0172d 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -565,7 +565,7 @@ void QCoreApplicationPrivate::initLocale() if (qt_locale_initialized) return; qt_locale_initialized = true; -#ifdef Q_OS_UNIX +#if defined(Q_OS_UNIX) && !defined(QT_BOOTSTRAPPED) setlocale(LC_ALL, ""); #endif }