diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2011-01-11 09:15:57 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2011-01-11 09:19:49 (GMT) |
commit | 099f9a6c56fb82e5df188f401aa3619fec0722ff (patch) | |
tree | 08916e8f141534338ebcf30a83a60d4e1e48cb27 /src/corelib/codecs | |
parent | e9e4fb8b15b5fd353a9728a76f5d528ec312ebb3 (diff) | |
download | Qt-099f9a6c56fb82e5df188f401aa3619fec0722ff.zip Qt-099f9a6c56fb82e5df188f401aa3619fec0722ff.tar.gz Qt-099f9a6c56fb82e5df188f401aa3619fec0722ff.tar.bz2 |
QTextCodec::codecForMib: actually use the cache
Was removed by mistake in commit 02aecce59cb76ceb88f635203553
Reviewed-by: Peter Hartmann
Diffstat (limited to 'src/corelib/codecs')
-rw-r--r-- | src/corelib/codecs/qtextcodec.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp index 2ae2924..93ed5ed 100644 --- a/src/corelib/codecs/qtextcodec.cpp +++ b/src/corelib/codecs/qtextcodec.cpp @@ -1090,8 +1090,11 @@ QTextCodec* QTextCodec::codecForMib(int mib) QByteArray key = "MIB: " + QByteArray::number(mib); QTextCodecCache *cache = qTextCodecCache(); QTextCodec *codec; - if (cache) + if (cache) { codec = cache->value(key); + if (codec) + return codec; + } QList<QTextCodec*>::ConstIterator i; for (int i = 0; i < all->size(); ++i) { |