On Wednesday, March 12, 2014 05:21:30 PM Stephen Kelly wrote:
> Hi,
> 
> I didn't follow the encoding work done by Clinton, and in my Qt 5 build with
> default settings, the new codepage related definition is not set. However,
> if it is set somehow, then the build would be calling methods which are not
> present in Qt 5.
> 
> I've just pushed a topic fixing that, but would appreciate review from
> Clinton?
> 
> Thanks,
> 
> Steve.

I personally would prefer a Qt version check around the new QTextCodec code.
Perhaps something like this:

#if defined(KWSYS_CP_UTF8)
  QTextCodec* utf8_codec = QTextCodec::codecForName("UTF-8");
  QTextCodec::setCodecForLocale(utf8_codec);
#if QT_VERSION < 0x050000
  QTextCodec::setCodecForCStrings(utf8_codec);
  QTextCodec::setCodecForTr(utf8_codec);
#endif
#endif

Does that compile for you?

Clint
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to