From 37a0e9c180e6dd670b5ba722218df00d88d8ad3b Mon Sep 17 00:00:00 2001 From: Alex Trotsenko Date: Fri, 25 Mar 2016 18:30:35 +0200 Subject: QNetworkReply: remove double buffering Since 5.7 we can write downloaded byte arrays directly to the QIODevice's internal read buffer without any memcpy/alloc overhead. This makes various other buffers redundant, so remove them. Task-number: QTBUG-45926 Change-Id: I577af70f856c9b852b7569a0070ae2bcbb4faaae Reviewed-by: Oswald Buddenhagen Reviewed-by: Edward Welbourne Reviewed-by: Markus Goetz (Woboq GmbH) --- src/network/access/qnetworkreplyimpl_p.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/network/access/qnetworkreplyimpl_p.h') diff --git a/src/network/access/qnetworkreplyimpl_p.h b/src/network/access/qnetworkreplyimpl_p.h index 156cb411c7..054cbcc3a7 100644 --- a/src/network/access/qnetworkreplyimpl_p.h +++ b/src/network/access/qnetworkreplyimpl_p.h @@ -81,7 +81,6 @@ public: virtual void close() Q_DECL_OVERRIDE; virtual qint64 bytesAvailable() const Q_DECL_OVERRIDE; virtual void setReadBufferSize(qint64 size) Q_DECL_OVERRIDE; - virtual bool canReadLine () const Q_DECL_OVERRIDE; virtual qint64 readData(char *data, qint64 maxlen) Q_DECL_OVERRIDE; virtual bool event(QEvent *) Q_DECL_OVERRIDE; @@ -187,8 +186,6 @@ public: QList proxyList; #endif - // Used for normal downloading. For "zero copy" the downloadBuffer is used - QByteDataBuffer readBuffer; qint64 bytesDownloaded; qint64 lastBytesDownloaded; qint64 bytesUploaded; @@ -199,7 +196,7 @@ public: State state; - // only used when the "zero copy" style is used. Else readBuffer is used. + // Only used when the "zero copy" style is used. // Please note that the whole "zero copy" download buffer API is private right now. Do not use it. qint64 downloadBufferReadPosition; qint64 downloadBufferCurrentSize; -- cgit v1.2.3