diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2010-01-18 15:33:02 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2010-02-12 14:42:02 (GMT) |
commit | f9f2eee3f9aa0396ef141ecd49ae43dba8a526c5 (patch) | |
tree | ff047a06daa3c0c5b7e457be0a4a91f8ac498541 /src/corelib | |
parent | b3b7796178f6a94fc46ef827b01a46420dae5a50 (diff) | |
download | Qt-f9f2eee3f9aa0396ef141ecd49ae43dba8a526c5.zip Qt-f9f2eee3f9aa0396ef141ecd49ae43dba8a526c5.tar.gz Qt-f9f2eee3f9aa0396ef141ecd49ae43dba8a526c5.tar.bz2 |
QTextCodec: Symbian has codec for UCS2, only fallback to UTF16 if UCS2 codec cannot be loaded
Reviewed-by: Denis
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/codecs/qtextcodec.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp index 2d332e9..ef7528d 100644 --- a/src/corelib/codecs/qtextcodec.cpp +++ b/src/corelib/codecs/qtextcodec.cpp @@ -1012,11 +1012,6 @@ QTextCodec* QTextCodec::codecForMib(int mib) if (codec) return codec; - // Qt 3 used 1000 (mib for UCS2) as its identifier for the utf16 codec. Map - // this correctly for compatibility. - if (mib == 1000) - mib = 1015; - QList<QTextCodec*>::ConstIterator i; for (int i = 0; i < all->size(); ++i) { QTextCodec *cursor = all->at(i); @@ -1027,6 +1022,12 @@ QTextCodec* QTextCodec::codecForMib(int mib) } codec = createForMib(mib); + + // Qt 3 used 1000 (mib for UCS2) as its identifier for the utf16 codec. Map + // this correctly for compatibility. + if (!codec && mib == 1000) + return codecForMib(1015); + if (codec) cache.insert(mib, codec); return codec; |