CPlusPlus: Remove foreach / Q_FOREACH usage

Task-number: QTCREATORBUG-27464
Change-Id: Idbcedd9f9a2e148cb18e53c9dc0b82b52b372d64
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Artem Sokolovskii
2022-05-19 13:06:41 +02:00
parent d41fc4b329
commit ac352492ca
13 changed files with 86 additions and 56 deletions

View File

@@ -839,7 +839,8 @@ void FindUsages::memInitializer(MemInitializerAST *ast)
Class *classScope = _currentScope->enclosingClass();
if (! classScope) {
if (ClassOrNamespace *binding = _context.lookupType(_currentScope)) {
foreach (Symbol *s, binding->symbols()) {
const QList<Symbol *> symbols = binding->symbols();
for (Symbol *s : symbols) {
if (Class *k = s->asClass()) {
classScope = k;
break;