cmd: Replace foreach with range base for (#2219)

Signed-off-by: Harald Eilertsen <haraldei@anduin.net>
This commit is contained in:
Harald Eilertsen 2020-09-27 13:25:52 +02:00
parent 1b1975e01d
commit 5f4cec870b
2 changed files with 3 additions and 3 deletions

View file

@ -293,8 +293,8 @@ void selectiveSyncFixup(OCC::SyncJournalDb *journal, const QStringList &newList)
auto oldBlackListSet = journal->getSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList, &ok).toSet();
if (ok) {
auto blackListSet = newList.toSet();
auto changes = (oldBlackListSet - blackListSet) + (blackListSet - oldBlackListSet);
foreach (const auto &it, changes) {
const auto changes = (oldBlackListSet - blackListSet) + (blackListSet - oldBlackListSet);
for (const auto &it : changes) {
journal->avoidReadFromDbOnNextSync(it);
}

View file

@ -27,7 +27,7 @@ bool SimpleSslErrorHandler::handleErrors(QList<QSslError> errors, const QSslConf
return false;
}
foreach (QSslError error, errors) {
for (const auto &error : qAsConst(errors)) {
certs->append(error.certificate());
}
return true;