forked from qt-creator/qt-creator
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user