summaryrefslogtreecommitdiffstats
path: root/examples/widgets/mainwindows/mainwindow/toolbar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/mainwindows/mainwindow/toolbar.cpp')
-rw-r--r--examples/widgets/mainwindows/mainwindow/toolbar.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/widgets/mainwindows/mainwindow/toolbar.cpp b/examples/widgets/mainwindows/mainwindow/toolbar.cpp
index 096d3df5a8..36d4108b1e 100644
--- a/examples/widgets/mainwindows/mainwindow/toolbar.cpp
+++ b/examples/widgets/mainwindows/mainwindow/toolbar.cpp
@@ -244,7 +244,8 @@ void ToolBar::order()
{
QList<QAction *> ordered;
QList<QAction *> actions1 = actions();
- foreach (QAction *action, findChildren<QAction *>()) {
+ const QList<QAction *> childActions = findChildren<QAction *>();
+ for (QAction *action : childActions) {
if (!actions1.contains(action))
continue;
actions1.removeAll(action);