diff options
author | Brad King <brad.king@kitware.com> | 2014-03-12 14:13:18 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-03-12 14:13:18 (GMT) |
commit | 85ffb02919ecd0af6373132a027815bdec9c1f91 (patch) | |
tree | 5eb9f30431ff32f29f01f15626945f8a6161c4e5 /Source | |
parent | 7122f6b1a8533f385a80cf5043f655a9940c1f04 (diff) | |
parent | 649789a736bb217f818696eae36ee6e6a2e1aa61 (diff) | |
download | CMake-85ffb02919ecd0af6373132a027815bdec9c1f91.zip CMake-85ffb02919ecd0af6373132a027815bdec9c1f91.tar.gz CMake-85ffb02919ecd0af6373132a027815bdec9c1f91.tar.bz2 |
Merge topic 'unicode-cmake-gui'
649789a7 Unicode: cmake-gui encoding now matches KWSys encoding.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/QtDialog/CMakeLists.txt | 5 | ||||
-rw-r--r-- | Source/QtDialog/CMakeSetup.cxx | 8 |
2 files changed, 13 insertions, 0 deletions
diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt index 4308a4d..0dd01d8 100644 --- a/Source/QtDialog/CMakeLists.txt +++ b/Source/QtDialog/CMakeLists.txt @@ -55,6 +55,11 @@ else() endif() endif() + +if(WIN32 AND KWSYS_ENCODING_DEFAULT_CODEPAGE MATCHES CP_UTF8) + add_definitions(-DKWSYS_CP_UTF8) +endif() + set(SRCS AddCacheEntry.cxx AddCacheEntry.h diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx index 821121e..995929e 100644 --- a/Source/QtDialog/CMakeSetup.cxx +++ b/Source/QtDialog/CMakeSetup.cxx @@ -14,6 +14,7 @@ #include <QDir> #include <QTranslator> #include <QLocale> +#include <QTextCodec> #include "QMacInstallDialog.h" #include "CMakeSetupDialog.h" #include "cmDocumentation.h" @@ -78,6 +79,13 @@ int main(int argc, char** argv) QApplication app(argc, argv); +#if defined(KWSYS_CP_UTF8) + QTextCodec* utf8_codec = QTextCodec::codecForName("UTF-8"); + QTextCodec::setCodecForCStrings(utf8_codec); + QTextCodec::setCodecForLocale(utf8_codec); + QTextCodec::setCodecForTr(utf8_codec); +#endif + // clean out standard Qt paths for plugins, which we don't use anyway // when creating Mac bundles, it potentially causes problems foreach(QString p, QApplication::libraryPaths()) |