summaryrefslogtreecommitdiffstats
path: root/src/downloadmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/downloadmanager.cpp')
-rw-r--r--src/downloadmanager.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp
index adbedd1..22c1c09 100644
--- a/src/downloadmanager.cpp
+++ b/src/downloadmanager.cpp
@@ -103,8 +103,9 @@ void DownloadManager::startNextDownload() {
if (downloadDir.exists(tmp)) {
qxtLog->debug() << "[dm] File already exists: "
<< downloadDir.absoluteFilePath(tmp);
- outfile.setFileName(QString(downloadDir.absolutePath() + "/" + tmp
- + ".\%1").arg(downloaded));
+ outfile.setFileName(
+ QString(downloadDir.absolutePath() + "/" + tmp + ".\%1").arg(
+ downloaded));
} else
outfile.setFileName(downloadDir.absoluteFilePath(tmp));
qxtLog->debug() << "[dm] Saving to: " << outfile.fileName();
@@ -172,7 +173,8 @@ void DownloadManager::downloadProgress(qint64 bytesIn, qint64 bytesTotal) {
currentProgress = ((bytesIn * 100) / bytesTotal);
if (currentProgress - lastProgress >= updateInterval) {
lastProgress = currentProgress;
- emit updateProgress(currentProgress, speed, unit);
+ emit
+ updateProgress(currentProgress, speed, unit);
qxtLog->debug() << "[dm] Download progress of "
<< currentDownload->url().toString() << ": " << bytesIn << "/"
<< bytesTotal << "(" << currentProgress << "\%)";
@@ -189,8 +191,8 @@ void DownloadManager::downloadFinished() {
qxtLog->debug() << "[dm] Download of "
<< currentDownload->url().toString()
<< " failed with HTTP error code: " << statusCode;
- emit notify(QString("Download failed! HTTP Status Code: %1").arg(
- statusCode));
+ emit
+ notify(QString("Download failed! HTTP Status Code: %1").arg(statusCode));
currentDownload->deleteLater();
} else {
// end download
@@ -199,8 +201,10 @@ void DownloadManager::downloadFinished() {
qxtLog->debug() << "[dm] Download of "
<< currentDownload->url().toString() << " finished. (downloaded = "
<< downloaded << ")";
- emit notify(QString("Successfully downloaded %1").arg(
- currentDownload->url().toString()));
+ emit
+ notify(
+ QString("Successfully downloaded %1").arg(
+ currentDownload->url().toString()));
currentDownload->deleteLater();
}
dip = false;