mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36: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;
|
||||
foreach (const QTime &time, remTimes) {
|
||||
for (const QTime &time : qAsConst(remTimes)) {
|
||||
if (time > remaining) {
|
||||
remaining = time;
|
||||
}
|
||||
}
|
||||
|
||||
int progress = 0;
|
||||
foreach (int prog, progresses) {
|
||||
for (int prog : qAsConst(progresses)) {
|
||||
progress += prog;
|
||||
}
|
||||
progress = progress / progresses.count();
|
||||
|
||||
double speed = 0.00;
|
||||
foreach (double spee, speeds) {
|
||||
for (double spee : qAsConst(speeds)) {
|
||||
speed += spee;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user