From ffeaff9a267f31f202578457d0fae96634a4ec2b Mon Sep 17 00:00:00 2001 From: David Faure Date: Tue, 22 Jan 2013 13:18:06 +0100 Subject: Fix QTextCodec race. The aliases for the TIS-620 codec were not available before loading it. This led to the following intermittent failure: QWARN : tst_QTextCodec::threadSafety() WARNING "MS874" not found? Change-Id: I8ed037d3238c04e1d35ed49e833ac01b7501d3e8 Reviewed-by: Lars Knoll --- src/corelib/codecs/qicucodec.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/corelib') diff --git a/src/corelib/codecs/qicucodec.cpp b/src/corelib/codecs/qicucodec.cpp index 79a3f77595..000f6872b5 100644 --- a/src/corelib/codecs/qicucodec.cpp +++ b/src/corelib/codecs/qicucodec.cpp @@ -453,8 +453,11 @@ QTextCodec *QIcuCodec::codecForNameUnlocked(const char *name) // backwards compatibility with Qt 4.x if (!qstrcmp(name, "CP949")) name = "windows-949"; - // this one is broken data in ICU 4.4, and can't be resolved even though it's an alias to tis-620 - if (!qstrcmp(name, "windows-874-2000")) + // these are broken data in ICU 4.4, and can't be resolved even though they are aliases to tis-620 + if (!qstrcmp(name, "windows-874-2000") + || !qstrcmp(name, "windows-874") + || !qstrcmp(name, "MS874") + || !qstrcmp(name, "x-windows-874")) name = "TIS-620"; UErrorCode error = U_ZERO_ERROR; -- cgit v1.2.3