summaryrefslogtreecommitdiffstats
path: root/src/network/access/qhttpnetworkreply.cpp
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2009-07-01 10:19:19 (GMT)
committerMarkus Goetz <Markus.Goetz@nokia.com>2009-07-01 14:04:00 (GMT)
commit5b1f4197d380718a15b3aa176f148bd6324bb1cb (patch)
tree8f280c28a5e1c52666c5dc7368de0fca697e68c6 /src/network/access/qhttpnetworkreply.cpp
parent7863bb9b96b482d74ad2f5fb3cb3b5716c8e45ef (diff)
downloadQt-5b1f4197d380718a15b3aa176f148bd6324bb1cb.zip
Qt-5b1f4197d380718a15b3aa176f148bd6324bb1cb.tar.gz
Qt-5b1f4197d380718a15b3aa176f148bd6324bb1cb.tar.bz2
QNAM: Direct transfer of HTTP buffer to the QNetworkReply buffer
Directly put a QRingBuffer from one QRingBuffer to another QRingBuffer. Reviewed-by: Thiago Macieira
Diffstat (limited to 'src/network/access/qhttpnetworkreply.cpp')
-rw-r--r--src/network/access/qhttpnetworkreply.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/network/access/qhttpnetworkreply.cpp b/src/network/access/qhttpnetworkreply.cpp
index 72aec99..483589b 100644
--- a/src/network/access/qhttpnetworkreply.cpp
+++ b/src/network/access/qhttpnetworkreply.cpp
@@ -185,6 +185,12 @@ QByteArray QHttpNetworkReply::read(qint64 maxSize)
return data;
}
+QByteArray QHttpNetworkReply::readAny()
+{
+ Q_D(QHttpNetworkReply);
+ return d->responseData.read();
+}
+
bool QHttpNetworkReply::isFinished() const
{
return d_func()->state == QHttpNetworkReplyPrivate::AllDoneState;
@@ -196,7 +202,7 @@ QHttpNetworkReplyPrivate::QHttpNetworkReplyPrivate(const QUrl &newUrl)
: QHttpNetworkHeaderPrivate(newUrl), state(NothingDoneState), statusCode(100),
majorVersion(0), minorVersion(0), bodyLength(0), contentRead(0), totalProgress(0),
currentChunkSize(0), currentChunkRead(0), connection(0), initInflate(false),
- autoDecompress(false), requestIsPrepared(false)
+ autoDecompress(false), responseData(0), requestIsPrepared(false)
{
}