path: root/src/network/access/qnetworkreply_p.h
diff options
authorShane Kearns <>2012-05-28 16:27:58 +0100
committerQt by Nokia <>2012-06-14 05:26:37 +0200
commit46e40214cfd62c935a20cddc7e9ae6fb45ba1884 (patch)
tree43b2b348cdd6ddb191b6f450aabf86e0fda7d1cf /src/network/access/qnetworkreply_p.h
parentd6d9c8bf3245ec3d1ff05ae45d54baac64d76cec (diff)
choke uploadProgress signals
The QNetworkReply::uploadProgress signal is intended for updating UI elements such as a progress bar. Limit the signal emissions to 10 per second to prevent overloading the UI with updates. As with the downloadProgress choke, this is implemented by dropping signals that occur within 100ms of the previous emission. The 100% signal is always emitted (bytesSent == bytesTotal) When the upload size is initially unknown, this behaviour is still provided by the upload device emitting a suitable readProgress signal when EOF is reached. Task-number: QTBUG-20449 Change-Id: I77e03c8a49109106e1c375ee00380293fd326b63 Reviewed-by: Martin Petersson <>
Diffstat (limited to 'src/network/access/qnetworkreply_p.h')
1 files changed, 1 insertions, 0 deletions
diff --git a/src/network/access/qnetworkreply_p.h b/src/network/access/qnetworkreply_p.h
index 04598fc712..453902392c 100644
--- a/src/network/access/qnetworkreply_p.h
+++ b/src/network/access/qnetworkreply_p.h
@@ -71,6 +71,7 @@ public:
QPointer<QNetworkAccessManager> manager;
qint64 readBufferMaxSize;
QElapsedTimer downloadProgressSignalChoke;
+ QElapsedTimer uploadProgressSignalChoke;
const static int progressSignalInterval;
QNetworkAccessManager::Operation operation;
QNetworkReply::NetworkError errorCode;