From 099f9a6c56fb82e5df188f401aa3619fec0722ff Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 11 Jan 2011 10:15:57 +0100 Subject: QTextCodec::codecForMib: actually use the cache Was removed by mistake in commit 02aecce59cb76ceb88f635203553 Reviewed-by: Peter Hartmann --- src/corelib/codecs/qtextcodec.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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::ConstIterator i; for (int i = 0; i < all->size(); ++i) { -- cgit v0.12