QmlJsEditor: Remove foreach / Q_FOREACH usage

Task-number: QTCREATORBUG-27464
Change-Id: I77741a639d8585d1e0ad04d7c5e6588852202e4a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Artem Sokolovskii
2022-05-17 16:11:03 +02:00
parent 840263eb9a
commit 54d4c4db62
11 changed files with 69 additions and 58 deletions

View File

@@ -400,7 +400,7 @@ bool QmlOutlineModel::dropMimeData(const QMimeData *data, Qt::DropAction action,
stream >> rowPath;
QModelIndex index;
foreach (int row, rowPath) {
for (int row : qAsConst(rowPath)) {
index = this->index(row, 0, index);
if (!index.isValid())
continue;
@@ -883,7 +883,7 @@ void QmlOutlineModel::reparentNodes(QmlOutlineItem *targetItem, int row, QList<Q
TextEditor::RefactoringFilePtr file = refactoring.file(
Utils::FilePath::fromString(m_semanticInfo.document->fileName()));
file->setChangeSet(changeSet);
foreach (const Utils::ChangeSet::Range &range, changedRanges) {
for (const Utils::ChangeSet::Range &range : qAsConst(changedRanges)) {
file->appendIndentRange(range);
}
file->apply();