Make QBuffer unbuffered

Sounds non-sense but it means that QIODevice will not try to copy from
QBuffer's buffer onto its own.

Eventually we should figure out to make QBuffer use the
QIODevice::buffer member that is already there and avoid all of this
mistake. Something for the future.

Change-Id: Ib700c9cadb46cec20a8ea5a69a488ded7104ac76
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
bb10
Thiago Macieira 2013-04-11 15:57:18 -07:00 committed by The Qt Project
parent 0d1ab4e667
commit 2ddbba9ba9
1 changed files with 1 additions and 1 deletions

View File

@ -334,7 +334,7 @@ bool QBuffer::open(OpenMode flags)
if ((flags & Truncate) == Truncate)
d->buf->resize(0);
return QIODevice::open(flags);
return QIODevice::open(flags | QIODevice::Unbuffered);
}
/*!