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:
parent
1457cfc1fd
commit
8bc38860bf
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user