diff options
author | Markus Goetz <Markus.Goetz@nokia.com> | 2010-09-28 16:32:16 (GMT) |
---|---|---|
committer | Markus Goetz <Markus.Goetz@nokia.com> | 2010-09-29 09:58:34 (GMT) |
commit | cf4f2847c1a1df101e2983a0e1e8682ace323c0d (patch) | |
tree | 6a054961d4e3ca66cbad075b25309ab4468c5d63 /src/network/access/qnetworkreplyimpl_p.h | |
parent | d49a7e382c69076de179103c9072e49a72db264d (diff) | |
download | Qt-cf4f2847c1a1df101e2983a0e1e8682ace323c0d.zip Qt-cf4f2847c1a1df101e2983a0e1e8682ace323c0d.tar.gz Qt-cf4f2847c1a1df101e2983a0e1e8682ace323c0d.tar.bz2 |
QNAM: More zerocopy changes
The zerocopy download buffer is now QSharedPointer<char>
instead of the QSharedPointer to QVarLengthArray<char>.
This will be a bit leaner to handle by QML and QtWebKit
and does not tie us to a QVLA that much.
Also fix some bugs related to signal emissions and the
return value of bytesAvailable(). Now the behaviour should be
the same if a zerocopy buffer is used or not.
Reviewed-by: Peter Hartmann
Reviewed-by: Thiago Macieira
Diffstat (limited to 'src/network/access/qnetworkreplyimpl_p.h')
-rw-r--r-- | src/network/access/qnetworkreplyimpl_p.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/network/access/qnetworkreplyimpl_p.h b/src/network/access/qnetworkreplyimpl_p.h index 2cb3082..e944601 100644 --- a/src/network/access/qnetworkreplyimpl_p.h +++ b/src/network/access/qnetworkreplyimpl_p.h @@ -62,7 +62,7 @@ #include "QtCore/qbuffer.h" #include "private/qringbuffer_p.h" #include "private/qbytedata_p.h" -#include <QVarLengthArray> +#include <QSharedPointer> QT_BEGIN_NAMESPACE @@ -206,9 +206,12 @@ public: State state; // only used when the "zero copy" style is used. Else readBuffer is used. - QSharedPointer< QVarLengthArray<char, 0> > downloadBufferArray; + // Please note that the whole "zero copy" download buffer API is private right now. Do not use it. + qint64 downloadBufferReadPosition; + qint64 downloadBufferCurrentSize; + qint64 downloadBufferMaximumSize; + QSharedPointer<char> downloadBufferPointer; char* downloadBuffer; - qint64 downloadBufferPosition; Q_DECLARE_PUBLIC(QNetworkReplyImpl) }; |