From b3d2bd1f5fdde4eddd205b46f9455d77e573d509 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Fri, 26 Jan 2018 17:59:08 +0100 Subject: [PATCH] DownloadItem: Fix calculating remaining time It is still not correct as it uses QTime which can only represent 24 hour timeframe. --- src/lib/downloads/downloaditem.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/downloads/downloaditem.cpp b/src/lib/downloads/downloaditem.cpp index 44a4632c6..ed7c5a386 100644 --- a/src/lib/downloads/downloaditem.cpp +++ b/src/lib/downloads/downloaditem.cpp @@ -1,6 +1,6 @@ /* ============================================================ * Falkon - Qt web browser -* Copyright (C) 2010-2017 David Rosca +* Copyright (C) 2010-2018 David Rosca * * 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;