diff --git a/src/plugins/help/docsettingspage.cpp b/src/plugins/help/docsettingspage.cpp index 56f692206d8..40223ea5d29 100644 --- a/src/plugins/help/docsettingspage.cpp +++ b/src/plugins/help/docsettingspage.cpp @@ -250,7 +250,7 @@ void DocSettingsPageWidget::addDocumentation() QSet values = Utils::toSet(m_filesToUnregister.values(nameSpace)); values.remove(filePath); m_filesToUnregister.remove(nameSpace); - foreach (const QString &value, values) + for (const QString &value : qAsConst(values)) m_filesToUnregister.insert(nameSpace, value); } } @@ -259,7 +259,8 @@ void DocSettingsPageWidget::addDocumentation() if (docsUnableToRegister.contains("UnknownNamespace")) { formatedFail += QString::fromLatin1(""; docsUnableToRegister.remove("UnknownNamespace"); diff --git a/src/plugins/help/generalsettingspage.cpp b/src/plugins/help/generalsettingspage.cpp index 04fa8bbd2aa..47ba717fd73 100644 --- a/src/plugins/help/generalsettingspage.cpp +++ b/src/plugins/help/generalsettingspage.cpp @@ -425,7 +425,7 @@ void GeneralSettingsPage::updateFontSizeSelector() // try to maintain selection or select closest. if (!pointSizes.empty()) { QString n; - foreach (int pointSize, pointSizes) + for (int pointSize : qAsConst(pointSizes)) m_widget->sizeComboBox->addItem(n.setNum(pointSize), QVariant(pointSize)); const int closestIndex = closestPointSizeIndex(m_font.pointSize()); if (closestIndex != -1) @@ -446,7 +446,7 @@ void GeneralSettingsPage::updateFontStyleSelector() if (!styles.empty()) { int normalIndex = -1; const QString normalStyle = "Normal"; - foreach (const QString &style, styles) { + for (const QString &style : styles) { // try to maintain selection or select 'normal' preferably const int newIndex = m_widget->styleComboBox->count(); m_widget->styleComboBox->addItem(style);