forked from qt-creator/qt-creator
Use qAsConst with non-const Qt containers in range-loops
... in various places Change-Id: Ic6c0c1b9437a1ed402105c7a14a1f5f9454a68d4 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -3113,7 +3113,7 @@ public:
|
||||
defaultImplTargetComboBox->insertItems(0, implTargetStrings);
|
||||
connect(defaultImplTargetComboBox, qOverload<int>(&QComboBox::currentIndexChanged), this,
|
||||
[this](int index) {
|
||||
for (QComboBox * const cb : m_implTargetBoxes)
|
||||
for (QComboBox * const cb : qAsConst(m_implTargetBoxes))
|
||||
cb->setCurrentIndex(index);
|
||||
});
|
||||
const auto defaultImplTargetLayout = new QHBoxLayout;
|
||||
@@ -4621,7 +4621,7 @@ public:
|
||||
}
|
||||
const QStringList memberFunctionsAsStrings = toStringList(memberFunctions);
|
||||
|
||||
for (Symbol *const member : dataMembers) {
|
||||
for (Symbol *const member : qAsConst(dataMembers)) {
|
||||
ExistingGetterSetterData existing;
|
||||
existing.memberVariableName = QString::fromUtf8(member->identifier()->chars(),
|
||||
member->identifier()->size());
|
||||
@@ -8000,7 +8000,7 @@ private:
|
||||
processIncludes(refactoring, filePath().toString());
|
||||
}
|
||||
|
||||
for (auto &file : m_changes)
|
||||
for (auto &file : qAsConst(m_changes))
|
||||
file->apply();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user