DownloadItem: Fix calculating remaining time

It is still not correct as it uses QTime which can only represent
24 hour timeframe.
remotes/origin/Falkon/3.0
David Rosca 8 years ago
parent d9c494b8f7
commit b3d2bd1f5f
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8
  1. 4
      src/lib/downloads/downloaditem.cpp

@ -1,6 +1,6 @@
/* ============================================================
* Falkon - Qt web browser
* Copyright (C) 2010-2017 David Rosca <nowrep@gmail.com>
* Copyright (C) 2010-2018 David Rosca <nowrep@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -235,7 +235,7 @@ void DownloadItem::updateDownloadInfo(double currSpeed, qint64 received, qint64
QString speed = currentSpeedToString(currSpeed);
// We have QString speed now
QTime time;
QTime time(0, 0, 0);
time = time.addSecs(estimatedTime);
QString remTime = remaingTimeToString(time);
m_remTime = time;

Loading…
Cancel
Save