forked from qt-creator/qt-creator
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user