summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2016-05-11 18:51:32 (GMT)
committerBrad King <brad.king@kitware.com>2016-05-12 13:24:36 (GMT)
commitcab095e11e618e2bb9a62538a080518946bafd4a (patch)
tree2c682f28ddb323e4a39184468ff00d466a3ace30
parenteb4f5104123a531bd49cb5834f3c66bb9e6aeeb6 (diff)
downloadCMake-cab095e11e618e2bb9a62538a080518946bafd4a.zip
CMake-cab095e11e618e2bb9a62538a080518946bafd4a.tar.gz
CMake-cab095e11e618e2bb9a62538a080518946bafd4a.tar.bz2
cmake-gui: Always use "C" locale for numbers (#16099)
Set LC_NUMERIC = "C" at startup after Qt initializes the application because Qt may have adopted the current locale from the environment. CMake does not define behavior for non-C-locale numeric behavior.
-rw-r--r--Source/QtDialog/CMakeSetup.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx
index b78a5df..1e1f040 100644
--- a/Source/QtDialog/CMakeSetup.cxx
+++ b/Source/QtDialog/CMakeSetup.cxx
@@ -94,6 +94,8 @@ int main(int argc, char** argv)
QApplication app(argc, argv);
+ setlocale(LC_NUMERIC, "C");
+
#if defined(CMAKE_ENCODING_UTF8)
QTextCodec* utf8_codec = QTextCodec::codecForName("UTF-8");
QTextCodec::setCodecForLocale(utf8_codec);