Vcs plugins: Replace foreach with ranged for loop

Change-Id: I9be29ef128f49f62a6e1f450d8c5277b467310e9
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Jarek Kobus
2022-09-30 16:34:09 +02:00
parent 8640e00447
commit 55efe40a58
5 changed files with 11 additions and 10 deletions

View File

@@ -834,7 +834,8 @@ bool BazaarPluginPrivate::submitEditorAboutToClose()
if (!commitWidget->committer().isEmpty())
extraOptions.append(QLatin1String("--author=") + commitWidget->committer());
// Fixed bugs
foreach (const QString &fix, commitWidget->fixedBugs()) {
const QStringList fixes = commitWidget->fixedBugs();
for (const QString &fix : fixes) {
if (!fix.isEmpty())
extraOptions << QLatin1String("--fixes") << fix;
}
@@ -864,7 +865,7 @@ void BazaarPluginPrivate::updateActions(VcsBasePluginPrivate::ActionState as)
m_revertFile->setParameter(filename);
m_statusFile->setParameter(filename);
foreach (QAction *repoAction, m_repositoryActionList)
for (QAction *repoAction : qAsConst(m_repositoryActionList))
repoAction->setEnabled(repoEnabled);
}