summaryrefslogtreecommitdiffstats
path: root/src/network/access/qhttpnetworkconnectionchannel.cpp
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2010-09-28 16:32:16 (GMT)
committerMarkus Goetz <Markus.Goetz@nokia.com>2010-09-29 09:58:34 (GMT)
commitcf4f2847c1a1df101e2983a0e1e8682ace323c0d (patch)
tree6a054961d4e3ca66cbad075b25309ab4468c5d63 /src/network/access/qhttpnetworkconnectionchannel.cpp
parentd49a7e382c69076de179103c9072e49a72db264d (diff)
downloadQt-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/qhttpnetworkconnectionchannel.cpp')
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp
index e39f9ed..617602d 100644
--- a/src/network/access/qhttpnetworkconnectionchannel.cpp
+++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
@@ -427,7 +427,8 @@ void QHttpNetworkConnectionChannel::_q_receiveReply()
replyPrivate->totalProgress += haveRead;
// the user will get notified of it via progress signal
- emit reply->dataReadProgress(replyPrivate->totalProgress, replyPrivate->bodyLength);
+ if (haveRead > 0)
+ emit reply->dataReadProgress(replyPrivate->totalProgress, replyPrivate->bodyLength);
} else if (!replyPrivate->isChunked() && !replyPrivate->autoDecompress
&& replyPrivate->bodyLength > 0) {
// bulk files like images should fulfill these properties and