summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Faure <david.faure@kdab.com>2013-01-22 13:18:06 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-01-22 13:40:42 +0100
commitffeaff9a267f31f202578457d0fae96634a4ec2b (patch)
treeb98c862004bf4f2baed3d4c7fea7aaee09e205bb /src
parente17dddfd3bcc09a9ae919a1650107c8cd3a75d08 (diff)
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 <lars.knoll@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/codecs/qicucodec.cpp7
1 files changed, 5 insertions, 2 deletions
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;