Commit e3af0ff3 authored by Oliver Sander's avatar Oliver Sander

Simplify a loop

parent 06b53477
......@@ -4215,11 +4215,10 @@ void PageView::updateZoomText()
void PageView::updateViewMode(const int nr)
{
for (int i=0; i < d->aViewMode->menu()->actions().size(); ++i) {
const QAction* action = d->aViewMode->menu()->actions().at(i);
for ( QAction* action : d->aViewMode->menu()->actions() ) {
QVariant mode_id = action->data();
if (mode_id.toInt() == nr) {
d->aViewMode->menu()->actions().at( i )->trigger();
action->trigger();
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment