summaryrefslogtreecommitdiffstats
path: root/src/network/access/qnetworkreplyimpl_p.h
diff options
context:
space:
mode:
authorAlex Trotsenko <alex1973tr@gmail.com>2016-03-25 18:30:35 +0200
committerAlex Trotsenko <alex1973tr@gmail.com>2016-05-25 18:10:07 +0000
commit37a0e9c180e6dd670b5ba722218df00d88d8ad3b (patch)
tree773d4015a3a082610192e9dece900eb51d64371c /src/network/access/qnetworkreplyimpl_p.h
parent8c428376891727fd4e5caf343bde6697dde29478 (diff)
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 <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
Diffstat (limited to 'src/network/access/qnetworkreplyimpl_p.h')
-rw-r--r--src/network/access/qnetworkreplyimpl_p.h5
1 files changed, 1 insertions, 4 deletions
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<QNetworkProxy> 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;