diff options
author | kh1 <karsten.heimrich@digia.com> | 2013-09-06 12:37:07 +0200 |
---|---|---|
committer | Tim Jenssen <tim.jenssen@digia.com> | 2013-09-09 13:08:33 +0200 |
commit | a4139682a7277385b5e2bc35829e94137584573a (patch) | |
tree | 1bb3a6a44d4b7d2561a4301f6e2627c474429fdd /src/libs/kdtools/kdupdaterfiledownloader.cpp | |
parent | 84c8a408327f7386905d7faa4c682618cbf46455 (diff) |
fix progress for redirected HTTP Downloads
- do not emit the progress in the redirect case for the redirect data
Task-number: QTIFW-267
Change-Id: Id32018a92df3098e45c963b4dcf7924bebdd1354
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
Reviewed-by: Niels Weber <niels.weber@digia.com>
Diffstat (limited to 'src/libs/kdtools/kdupdaterfiledownloader.cpp')
-rw-r--r-- | src/libs/kdtools/kdupdaterfiledownloader.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libs/kdtools/kdupdaterfiledownloader.cpp b/src/libs/kdtools/kdupdaterfiledownloader.cpp index fee2a853e..a7fbfe85b 100644 --- a/src/libs/kdtools/kdupdaterfiledownloader.cpp +++ b/src/libs/kdtools/kdupdaterfiledownloader.cpp @@ -979,6 +979,12 @@ void KDUpdater::HttpDownloader::httpReqFinished() void KDUpdater::HttpDownloader::httpReadProgress(qint64 done, qint64 total) { + if (d->http) { + const QUrl redirectUrl = d->http->attribute(QNetworkRequest::RedirectionTargetAttribute).toUrl(); + if (followRedirects() && redirectUrl.isValid()) + return; // if we are a redirection, do not emit the progress + } + setProgress(done, total); emit downloadProgress(calcProgress(done, total)); } |