summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/downloadarchivesjob.cpp
diff options
context:
space:
mode:
authorkh1 <karsten.heimrich@nokia.com>2012-10-01 15:34:09 +0200
committerKarsten Heimrich <karsten.heimrich@digia.com>2012-10-08 12:32:29 +0200
commit0d847f994e40f8002918a454527b6600645d5193 (patch)
tree8768b9b730beba24c6a1b21cc91469ae38123d19 /src/libs/installer/downloadarchivesjob.cpp
parent6e1ee181d96104507fb1a42990905b8a98d10b10 (diff)
Only increment the counter if we where successful.
Change-Id: I54a01b2b444dd27ac783e8ab3729faa6dfacb8e1 Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
Diffstat (limited to 'src/libs/installer/downloadarchivesjob.cpp')
-rw-r--r--src/libs/installer/downloadarchivesjob.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libs/installer/downloadarchivesjob.cpp b/src/libs/installer/downloadarchivesjob.cpp
index 74f5cdd5a..49abee339 100644
--- a/src/libs/installer/downloadarchivesjob.cpp
+++ b/src/libs/installer/downloadarchivesjob.cpp
@@ -211,19 +211,12 @@ void DownloadArchivesJob::timerEvent(QTimerEvent *event)
}
/*!
- Registers the just downloaded file in the intaller's file system.
+ Registers the just downloaded file in the installer's file system.
*/
void DownloadArchivesJob::registerFile()
{
Q_ASSERT(m_downloader != 0);
- ++m_archivesDownloaded;
- if (m_progressChangedTimerId) {
- killTimer(m_progressChangedTimerId);
- m_progressChangedTimerId = 0;
- emit progressChanged(double(m_archivesDownloaded) / m_archivesToDownloadCount);
- }
-
const QString tempFile = m_downloader->downloadedFileName();
if (m_core->testChecksum()) {
QFile archiveFile(tempFile);
@@ -251,6 +244,13 @@ void DownloadArchivesJob::registerFile()
}
}
+ ++m_archivesDownloaded;
+ if (m_progressChangedTimerId) {
+ killTimer(m_progressChangedTimerId);
+ m_progressChangedTimerId = 0;
+ emit progressChanged(double(m_archivesDownloaded) / m_archivesToDownloadCount);
+ }
+
m_temporaryFiles.insert(tempFile);
const QPair<QString, QString> pair = m_archivesToDownload.takeFirst();
QInstallerCreator::BinaryFormatEngineHandler::instance()->registerArchive(pair.first, tempFile);