summaryrefslogtreecommitdiff
path: root/src/downloadmanager.cpp
diff options
context:
space:
mode:
authorAL <26797547+Al12rs@users.noreply.github.com>2020-02-15 23:02:49 +0100
committerAL <26797547+Al12rs@users.noreply.github.com>2020-02-15 23:02:49 +0100
commit423db567816bb3b71ae907195d4a92b9c293e5e9 (patch)
tree696f4332b1806849fe3fad4925d34b25e45e527e /src/downloadmanager.cpp
parent86c5b64ab5d1b57f0bc1f184983adb0936e6de3f (diff)
Change Qtime to QElapsedtimer in some palaces to remove the warnings.
Diffstat (limited to 'src/downloadmanager.cpp')
-rw-r--r--src/downloadmanager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp
index 7b416d50..1fc7e184 100644
--- a/src/downloadmanager.cpp
+++ b/src/downloadmanager.cpp
@@ -2027,7 +2027,7 @@ void DownloadManager::downloadFinished(int index)
foreach (const QVariant &server, info->m_FileInfo->userData["downloadMap"].toList()) {
QVariantMap serverMap = server.toMap();
if (serverMap["URI"].toString() == url) {
- int deltaTime = info->m_StartTime.secsTo(QTime::currentTime());
+ int deltaTime = info->m_StartTime.elapsed() / 1000;
if (deltaTime > 5) {
emit downloadSpeed(serverMap["short_name"].toString(), (info->m_TotalSize - info->m_PreResumeSize) / deltaTime);
} // no division by zero please! Also, if the download is shorter than a few seconds, the result is way to inprecise