mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-18 05:01:50 -06:00
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.
This commit is contained in:
committed by
Brad King
parent
eb4f510412
commit
cab095e11e
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user