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
parent
0d1ab4e667
commit
2ddbba9ba9
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
|
|||
Loading…
Reference in New Issue