Mercurial > octave
diff libgui/src/main-window.cc @ 27676:ea7d36e9f197
use standard C++ range-based for loops instead of Qt foreach macro
* documentation.cc, file-editor.cc, octave-qscintilla.cc,
main-window.cc, resource-manager.cc, variable-editor.cc: Replace uses
of Qt foreach macros with standard C++ range-based for loops.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 12 Nov 2019 13:51:22 -0500 |
parents | a36443e94f8a |
children | 96d87e7093d0 |
line wrap: on
line diff
--- a/libgui/src/main-window.cc Tue Nov 12 13:35:44 2019 -0500 +++ b/libgui/src/main-window.cc Tue Nov 12 13:51:22 2019 -0500 @@ -322,7 +322,7 @@ { // Go through all dock widgets and check whether the current widget // widget with focus is a child of one of it - foreach (octave_dock_widget *w, w_list) + for (auto w : w_list) { if (w->isAncestorOf (w_new)) dock = w; @@ -867,7 +867,7 @@ } QString icon; - foreach (octave_dock_widget *widget, dock_widget_list ()) + for (auto *widget : dock_widget_list ()) { QString name = widget->objectName (); if (! name.isEmpty ()) @@ -1478,7 +1478,7 @@ } // Restore the geometry of all dock-widgets - foreach (octave_dock_widget *widget, dock_widget_list ()) + for (auto *widget : dock_widget_list ()) { QString name = widget->objectName (); @@ -1564,7 +1564,7 @@ // This has to be done after the window is shown (see octave-gui.cc) void main_window::connect_visibility_changed (void) { - foreach (octave_dock_widget *widget, dock_widget_list ()) + for (auto *widget : dock_widget_list ()) widget->connect_visibility_changed (); #if defined (HAVE_QSCINTILLA)