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:
@@ -268,7 +268,7 @@ void PythonBuildSystem::triggerParsing()
|
||||
if (modelManager) {
|
||||
auto projectInfo = modelManager->defaultProjectInfoForProject(project());
|
||||
|
||||
for (const QString &importPath : m_qmlImportPaths) {
|
||||
for (const QString &importPath : qAsConst(m_qmlImportPaths)) {
|
||||
const Utils::FilePath filePath = Utils::FilePath::fromString(importPath);
|
||||
projectInfo.importPaths.maybeInsert(filePath, QmlJS::Dialect::Qml);
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ void InterpreterAspect::updateComboBox()
|
||||
int defaultIndex = -1;
|
||||
const QString currentId = m_currentId;
|
||||
m_comboBox->clear();
|
||||
for (const Interpreter &interpreter : m_interpreters) {
|
||||
for (const Interpreter &interpreter : qAsConst(m_interpreters)) {
|
||||
int index = m_comboBox->count();
|
||||
m_comboBox->addItem(interpreter.name);
|
||||
m_comboBox->setItemData(index, interpreter.command.toUserOutput(), Qt::ToolTipRole);
|
||||
|
||||
Reference in New Issue
Block a user