From 2ddbba9ba9709090de7ffbd00d0127cb3cca0869 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 11 Apr 2013 15:57:18 -0700 Subject: 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 Reviewed-by: Robin Burchell --- src/corelib/io/qbuffer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib') diff --git a/src/corelib/io/qbuffer.cpp b/src/corelib/io/qbuffer.cpp index 4b7edd8481..5748c5437a 100644 --- a/src/corelib/io/qbuffer.cpp +++ b/src/corelib/io/qbuffer.cpp @@ -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); } /*! -- cgit v1.2.3