diff options
author | Chris Kawano <808christian@gmail.com> | 2011-03-01 12:12:37 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2011-03-01 12:20:33 (GMT) |
commit | 17a4f332f0d416af842145f0ebc7f2ebe7f33527 (patch) | |
tree | 822b21b8f3036c28000fc90af54899dc6c0e639b /doc/src/snippets/code/doc_src_activeqt-dumpcpp.cpp | |
parent | cb042e8dcc836a89919d7c048698154f2c423307 (diff) | |
download | Qt-17a4f332f0d416af842145f0ebc7f2ebe7f33527.zip Qt-17a4f332f0d416af842145f0ebc7f2ebe7f33527.tar.gz Qt-17a4f332f0d416af842145f0ebc7f2ebe7f33527.tar.bz2 |
Fix QTextStream::pos() causes buffer offset issues on large text files.
When reading large files that are greater in size than the
TEXTSTREAM_BUFFERSIZE buffer, calling pos() caused erroneous buffer
positioning. The cause of this was QTextStreamPrivate::readBufferOffset
value being updated, but QTextStreamPrivate::readConverterSavedStateOffset
was not. Usually, if pos() is called, it is called multiple times. Since
QTextStreamPrivate::readConverterSavedStateOffset was never reset,
QTextStreamPrivate::readBufferOffset would accumulate the wrong position
and QTextStreamPrivate::consume() will 'discard' the wrong number of
bytes from the buffer.
Task-number: QTBUG-9814
Merge-request: 2569
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
Diffstat (limited to 'doc/src/snippets/code/doc_src_activeqt-dumpcpp.cpp')
0 files changed, 0 insertions, 0 deletions