summaryrefslogtreecommitdiffstats
path: root/src/downloadmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/downloadmanager.cpp')
-rw-r--r--src/downloadmanager.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp
index 501b1d5..bcfaafb 100644
--- a/src/downloadmanager.cpp
+++ b/src/downloadmanager.cpp
@@ -144,17 +144,17 @@ void DownloadManager::downloadProgress(qint64 bytesIn, qint64 bytesTotal)
// calculate current speed
double speed = bytesIn * 1000 / dltime.elapsed();
QString unit;
- if (speed < 1024) {
+ if (speed < 1024){
unit = "bytes/sec";
- }
- else if (speed < 1024*1024) {
+ }
+ else if (speed < 1024*1024){
speed /= 1024;
unit = "KB/s";
- }
- else {
+ }
+ else{
speed /= 1024*1024;
unit = "MB/s";
- }
+ }
// update progress only if difference higher than the updateInterval setting
currentProgress = ((bytesIn * 100) / bytesTotal);
if (currentProgress - lastProgress >= updateInterval){