From a050bba2f0151beb508fa7ab6f58c25c4e92bfb0 Mon Sep 17 00:00:00 2001 From: Martin Petersson Date: Mon, 7 May 2012 12:41:58 +0200 Subject: QNetworkReply::setReadBufferSize fix for threaded http Added the setReadBufferSize functionallity again by limiting the amount that the delegate read from the channel. Each time that data is fetched from the reply buffer, we communicate back to the thread so that more data can be fetched. Task-number: QTBUG-25327 Change-Id: I2f9950196e64acd09bc8da50c1116f2c9deacad4 Reviewed-by: Shane Kearns Reviewed-by: Lars Knoll --- src/network/access/qhttpnetworkreply_p.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/network/access/qhttpnetworkreply_p.h') diff --git a/src/network/access/qhttpnetworkreply_p.h b/src/network/access/qhttpnetworkreply_p.h index 97fefc6e1b..b3c16a8258 100644 --- a/src/network/access/qhttpnetworkreply_p.h +++ b/src/network/access/qhttpnetworkreply_p.h @@ -120,7 +120,10 @@ public: bool readAnyAvailable() const; QByteArray readAny(); QByteArray readAll(); + QByteArray read(qint64 amount); + qint64 sizeNextBlock(); void setDownstreamLimited(bool t); + void setReadBufferSize(qint64 size); bool supportsUserProvidedDownloadBuffer(); void setUserProvidedDownloadBuffer(char*); @@ -220,6 +223,7 @@ public: bool lastChunkRead; qint64 currentChunkSize; qint64 currentChunkRead; + qint64 readBufferMaxSize; QPointer connection; QPointer connectionChannel; -- cgit v1.2.3