Mercurial > octave
diff libgui/src/m-editor/file-editor.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 | fb9258fcf14b |
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor.cc Tue Nov 12 13:35:44 2019 -0500 +++ b/libgui/src/m-editor/file-editor.cc Tue Nov 12 13:51:22 2019 -0500 @@ -1631,9 +1631,8 @@ { // remove all standard actions from scintilla QList<QAction *> all_actions = menu->actions (); - QAction *a; - - foreach (a, all_actions) + + for (auto *a : all_actions) menu->removeAction (a); // add editor's actions with icons and customized shortcuts @@ -1701,7 +1700,7 @@ { if (e->mimeData ()->hasUrls ()) { - foreach (QUrl url, e->mimeData ()->urls ()) + for (const auto& url : e->mimeData ()->urls ()) request_open_file (url.toLocalFile ()); } }