summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-06-10 20:13:57 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-06-11 19:03:59 (GMT)
commita2baabcfcb60a7a0e5d3926ad6938983e50dfefc (patch)
tree26f31772d97e31e981d8b87d5b69091081d33047 /src/corelib
parent6564a1262c6a151336a35e722e437b6f1a192c54 (diff)
downloadQt-a2baabcfcb60a7a0e5d3926ad6938983e50dfefc.zip
Qt-a2baabcfcb60a7a0e5d3926ad6938983e50dfefc.tar.gz
Qt-a2baabcfcb60a7a0e5d3926ad6938983e50dfefc.tar.bz2
Use the old codec if there is one available when reading data in qtextstream.
Reviewed-by: trustme
Diffstat (limited to 'src/corelib')
-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 7c925f1..75c682a 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;