1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 18:56:34 +01:00

downloadmanager: port foreach -> range-based for

Signed-off-by: Juraj Oravec <sgd.orava@gmail.com>
This commit is contained in:
Juraj Oravec 2019-12-30 17:55:52 +01:00
parent 1457cfc1fd
commit 8bc38860bf
No known key found for this signature in database
GPG Key ID: 63ACB65056BC8D07

View File

@ -241,20 +241,20 @@ void DownloadManager::timerEvent(QTimerEvent* e)
} }
QTime remaining; QTime remaining;
foreach (const QTime &time, remTimes) { for (const QTime &time : qAsConst(remTimes)) {
if (time > remaining) { if (time > remaining) {
remaining = time; remaining = time;
} }
} }
int progress = 0; int progress = 0;
foreach (int prog, progresses) { for (int prog : qAsConst(progresses)) {
progress += prog; progress += prog;
} }
progress = progress / progresses.count(); progress = progress / progresses.count();
double speed = 0.00; double speed = 0.00;
foreach (double spee, speeds) { for (double spee : qAsConst(speeds)) {
speed += spee; speed += spee;
} }