Replace foreach with ranged for loop

Change-Id: I6238651d0b6ea8b932195711d3da7442158d2456
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Jarek Kobus
2022-10-06 20:00:31 +02:00
parent 28c507eccb
commit 70466ed811
4 changed files with 10 additions and 8 deletions

View File

@@ -853,7 +853,8 @@ bool FossilPluginPrivate::submitEditorAboutToClose()
extraOptions << "--branch" << enquotedBranch;
}
// Tags
foreach (QString tag, commitWidget->tags()) {
const QStringList tags = commitWidget->tags();
for (const QString &tag : tags) {
extraOptions << "--tag" << tag;
}
@@ -886,7 +887,7 @@ void FossilPluginPrivate::updateActions(VcsBase::VcsBasePluginPrivate::ActionSta
m_revertFile->setParameter(filename);
m_statusFile->setParameter(filename);
foreach (QAction *repoAction, m_repositoryActionList)
for (QAction *repoAction : qAsConst(m_repositoryActionList))
repoAction->setEnabled(repoEnabled);
}