[cmake-developers] Review request: fix-Qt5-windows-build
Stephen Kelly
steveire at gmail.com
Wed Mar 12 12:50:09 EDT 2014
Clinton Stimpson wrote:
>
> I personally would prefer a Qt version check
This compiles:
diff --git a/Source/QtDialog/CMakeSetup.cxx
b/Source/QtDialog/CMakeSetup.cxx
index 995929e..d1fbe9f 100644
--- a/Source/QtDialog/CMakeSetup.cxx
+++ b/Source/QtDialog/CMakeSetup.cxx
@@ -79,12 +79,14 @@ int main(int argc, char** argv)
QApplication app(argc, argv);
-#if defined(KWSYS_CP_UTF8)
+// #if defined(KWSYS_CP_UTF8)
QTextCodec* utf8_codec = QTextCodec::codecForName("UTF-8");
- QTextCodec::setCodecForCStrings(utf8_codec);
QTextCodec::setCodecForLocale(utf8_codec);
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
+ QTextCodec::setCodecForCStrings(utf8_codec);
QTextCodec::setCodecForTr(utf8_codec);
#endif
+// #endif
// clean out standard Qt paths for plugins, which we don't use anyway
// when creating Mac bundles, it potentially causes problems
but I don't think it's better, I didn't runtime-test it, and I don't know
what would trigger the KWSYS_CP_UTF8 to be defined anyway as it is not on my
system. I just wanted to compile-out the new code.
If you can runtime-test the behavior of the new lines with Qt 5, I'd say go
ahead and commit that.
Thanks,
Steve.
More information about the cmake-developers
mailing list