forked from qt-creator/qt-creator
CorePlugin: Remove foreach / Q_FOREACH usage
Task-number: QTCREATORBUG-27464 Change-Id: I0d0257bbd46f3eec9b11b386d1987156e83a9dac 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:
@@ -113,7 +113,7 @@ void NavigationSubWidget::comboBoxIndexChanged(int factoryIndex)
|
||||
saveSettings();
|
||||
|
||||
// Remove toolbutton
|
||||
foreach (QWidget *w, m_additionalToolBarWidgets)
|
||||
for (QWidget *w : qAsConst(m_additionalToolBarWidgets))
|
||||
delete w;
|
||||
m_additionalToolBarWidgets.clear();
|
||||
|
||||
@@ -134,9 +134,8 @@ void NavigationSubWidget::comboBoxIndexChanged(int factoryIndex)
|
||||
// Add Toolbutton
|
||||
m_additionalToolBarWidgets = n.dockToolBarWidgets;
|
||||
auto layout = qobject_cast<QHBoxLayout *>(m_toolBar->layout());
|
||||
foreach (QToolButton *w, m_additionalToolBarWidgets) {
|
||||
for (QToolButton *w : qAsConst(m_additionalToolBarWidgets))
|
||||
layout->insertWidget(layout->count()-2, w);
|
||||
}
|
||||
|
||||
restoreSettings();
|
||||
emit factoryIndexChanged(factoryIndex);
|
||||
|
||||
Reference in New Issue
Block a user