FakeVim: Modernize a bit

Some ranged-for and const.

Change-Id: I6ff521393166aa4c61289de88e8c31320887b1b4
Reviewed-by: Lukas Holecek <hluk@email.cz>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2020-05-28 07:46:41 +02:00
parent 839e776012
commit cdfc62b287
2 changed files with 12 additions and 12 deletions

View File

@@ -1409,7 +1409,7 @@ void FakeVimPluginPrivate::moveSomewhere(FakeVimHandler *handler, DistFunction f
while (repeat < 0 || repeat-- > 0) {
editors.removeOne(currentEditor);
int bestValue = -1;
foreach (IEditor *editor, editors) {
for (IEditor *editor : qAsConst(editors)) {
QWidget *w = editor->widget();
QRect editorRect(w->mapToGlobal(w->geometry().topLeft()),
w->mapToGlobal(w->geometry().bottomRight()));
@@ -1441,7 +1441,7 @@ void FakeVimPluginPrivate::keepOnlyWindow()
QList<IEditor *> editors = EditorManager::visibleEditors();
editors.removeOne(currentEditor);
foreach (IEditor *editor, editors) {
for (IEditor *editor : qAsConst(editors)) {
EditorManager::activateEditor(editor);
triggerAction(Core::Constants::REMOVE_CURRENT_SPLIT);
}