CorePlugin: Remove foreach / Q_FOREACH usage

Task-number: QTCREATORBUG-27464
Change-Id: I0d0257bbd46f3eec9b11b386d1987156e83a9dac
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Artem Sokolovskii
2022-05-02 11:22:55 +02:00
parent 71b84417b3
commit 54628488a4
14 changed files with 38 additions and 35 deletions

View File

@@ -217,7 +217,8 @@ void SettingsDatabase::remove(const QString &key)
const QString effectiveKey = d->effectiveKey(key);
// Remove keys from the cache
foreach (const QString &k, d->m_settings.keys()) {
const QStringList keys = d->m_settings.keys();
for (const QString &k : keys) {
// Either it's an exact match, or it matches up to a /
if (k.startsWith(effectiveKey)
&& (k.length() == effectiveKey.length()