summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qtextstream.cpp
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-06-10 22:13:57 +0200
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-06-11 21:03:59 +0200
commita2baabcfcb60a7a0e5d3926ad6938983e50dfefc (patch)
tree26f31772d97e31e981d8b87d5b69091081d33047 /src/corelib/io/qtextstream.cpp
parent6564a1262c6a151336a35e722e437b6f1a192c54 (diff)
Use the old codec if there is one available when reading data in qtextstream.
Reviewed-by: trustme
Diffstat (limited to 'src/corelib/io/qtextstream.cpp')
-rw-r--r--src/corelib/io/qtextstream.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qtextstream.cpp b/src/corelib/io/qtextstream.cpp
index 7c925f171f..75c682aa4c 100644
--- a/src/corelib/io/qtextstream.cpp
+++ b/src/corelib/io/qtextstream.cpp
@@ -561,7 +561,7 @@ bool QTextStreamPrivate::fillReadBuffer(qint64 maxBytes)
if (!codec || autoDetectUnicode) {
autoDetectUnicode = false;
- codec = QTextCodec::codecForUtfText(QByteArray::fromRawData(buf, bytesRead), 0);
+ codec = QTextCodec::codecForUtfText(QByteArray::fromRawData(buf, bytesRead), codec);
if (!codec) {
codec = QTextCodec::codecForLocale();
writeConverterState.flags |= QTextCodec::IgnoreHeader;