diff options
-rw-r--r-- | src/corelib/codecs/qtextcodec.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp index ef7528d..c0aa342 100644 --- a/src/corelib/codecs/qtextcodec.cpp +++ b/src/corelib/codecs/qtextcodec.cpp @@ -975,8 +975,10 @@ QTextCodec *QTextCodec::codecForName(const QByteArray &name) for (int i = 0; i < all->size(); ++i) { QTextCodec *cursor = all->at(i); - if (nameMatch(cursor->name(), name)) + if (nameMatch(cursor->name(), name)) { + cache.insert(name, cursor); return cursor; + } QList<QByteArray> aliases = cursor->aliases(); for (int y = 0; y < aliases.size(); ++y) if (nameMatch(aliases.at(y), name)) { |