There should only be one write buffer at a time in QFile
commit6f5fb0be85b1d7cc9f93b615b5034c882e946301
authorJoão Abecasis <joao@abecasis.name>
Mon, 16 Nov 2009 11:36:48 +0000 (16 12:36 +0100)
committerJoão Abecasis <joao@abecasis.name>
Tue, 17 Nov 2009 13:00:37 +0000 (17 14:00 +0100)
treeb18d08550ce8a5b39fb20e3b3ea91afcb45ad3af
parent1e6180c1de906864d2d6d73a9e18ed67574d4ed8
There should only be one write buffer at a time in QFile

To be sure, we should explicitly use the size of that buffer and not the
whole QRingBuffer when flushing the data.

With this change, we make violations of the one-buffer-rule explicitly
fail on flush(), but we avoid corrupting data and reading past the
buffer's end.

Reviewed-by: Markus Goetz
src/corelib/io/qfile.cpp