diff options
author | Markus Goetz <Markus.Goetz@nokia.com> | 2009-06-25 14:52:45 (GMT) |
---|---|---|
committer | Markus Goetz <Markus.Goetz@nokia.com> | 2009-06-25 15:25:15 (GMT) |
commit | 3984253ac58e0cca1c0b94fad1549dd4e0e3c2e1 (patch) | |
tree | 98fdc5bf2e42626eb0cebcfb60c2a61a73b352c3 /src/network/access/qhttpnetworkreply_p.h | |
parent | b393abc9ce2e2a5396e655895fe653f9e06e355f (diff) | |
download | Qt-3984253ac58e0cca1c0b94fad1549dd4e0e3c2e1.zip Qt-3984253ac58e0cca1c0b94fad1549dd4e0e3c2e1.tar.gz Qt-3984253ac58e0cca1c0b94fad1549dd4e0e3c2e1.tar.bz2 |
QNAM HTTP Code: Prepare for download performance improvements
Change the QByteArray to a QRingBuffer to save re-allocation time.
Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
Diffstat (limited to 'src/network/access/qhttpnetworkreply_p.h')
-rw-r--r-- | src/network/access/qhttpnetworkreply_p.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/network/access/qhttpnetworkreply_p.h b/src/network/access/qhttpnetworkreply_p.h index 08bd886..69c9158 100644 --- a/src/network/access/qhttpnetworkreply_p.h +++ b/src/network/access/qhttpnetworkreply_p.h @@ -79,6 +79,7 @@ static const unsigned char gz_magic[2] = {0x1f, 0x8b}; // gzip magic header #include <private/qhttpnetworkheader_p.h> #include <private/qhttpnetworkrequest_p.h> #include <private/qauthenticator_p.h> +#include <private/qringbuffer_p.h> QT_BEGIN_NAMESPACE @@ -120,6 +121,7 @@ public: QString reasonPhrase() const; qint64 bytesAvailable() const; + qint64 bytesAvailableNextBlock() const; QByteArray read(qint64 maxSize = -1); bool isFinished() const; @@ -193,7 +195,7 @@ public: qint64 bodyLength; qint64 contentRead; qint64 totalProgress; - QByteArray fragment; + QByteArray fragment; // used for header, status, chunk header etc, not for reply data qint64 currentChunkSize; qint64 currentChunkRead; QPointer<QHttpNetworkConnection> connection; @@ -204,7 +206,7 @@ public: #endif bool autoDecompress; - QByteArray responseData; // uncompressed body + QRingBuffer responseData; // uncompressed body QByteArray compressedData; // compressed body (temporary) bool requestIsPrepared; }; |