forked from qt-creator/qt-creator
CorePlugin: Remove foreach / Q_FOREACH usage mostly in dialogs
Task-number: QTCREATORBUG-27464 Change-Id: Iad47e9cb0b2fa7590dba2d26d0a33a83d2909bb7 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -270,18 +270,18 @@ bool IOptionsPage::matches(const QRegularExpression ®exp) const
|
||||
if (!widget)
|
||||
return false;
|
||||
// find common subwidgets
|
||||
foreach (const QLabel *label, widget->findChildren<QLabel *>())
|
||||
for (const QLabel *label : widget->findChildren<QLabel *>())
|
||||
m_keywords << Utils::stripAccelerator(label->text());
|
||||
foreach (const QCheckBox *checkbox, widget->findChildren<QCheckBox *>())
|
||||
for (const QCheckBox *checkbox : widget->findChildren<QCheckBox *>())
|
||||
m_keywords << Utils::stripAccelerator(checkbox->text());
|
||||
foreach (const QPushButton *pushButton, widget->findChildren<QPushButton *>())
|
||||
for (const QPushButton *pushButton : widget->findChildren<QPushButton *>())
|
||||
m_keywords << Utils::stripAccelerator(pushButton->text());
|
||||
foreach (const QGroupBox *groupBox, widget->findChildren<QGroupBox *>())
|
||||
for (const QGroupBox *groupBox : widget->findChildren<QGroupBox *>())
|
||||
m_keywords << Utils::stripAccelerator(groupBox->title());
|
||||
|
||||
m_keywordsInitialized = true;
|
||||
}
|
||||
foreach (const QString &keyword, m_keywords)
|
||||
for (const QString &keyword : qAsConst(m_keywords))
|
||||
if (keyword.contains(regexp))
|
||||
return true;
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user