Mercurial > octave
diff libgui/src/m-editor/octave-qscintilla.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 | 3a85d8547584 |
line wrap: on
line diff
--- a/libgui/src/m-editor/octave-qscintilla.cc Tue Nov 12 13:35:44 2019 -0500 +++ b/libgui/src/m-editor/octave-qscintilla.cc Tue Nov 12 13:51:22 2019 -0500 @@ -303,14 +303,14 @@ { // remove all standard actions from scintilla QList<QAction *> all_actions = context_menu->actions (); - QAction *a; - foreach (a, all_actions) + for (auto *a : all_actions) context_menu->removeAction (a); - a = context_menu->addAction (tr ("dbstop if ..."), this, + QAction *act + = context_menu->addAction (tr ("dbstop if ..."), this, SLOT (contextmenu_break_condition (bool))); - a->setData (local_pos); + act->setData (local_pos); } #endif