Mercurial > octave
diff libgui/src/main-window.cc @ 31599:50a225732661 stable
use initializer lists instead of insertion operators
* gui-preferences-cs.h, gui-preferences-ed.h,
gui-preferences-global.h, gui-preferences-ve.h, gui-preferences-ws.h,
main-window.cc: Where possible, use initializer lists ({ a, b, ... })
instead of insertion operators (QStringList () << a << b << ...).
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 01 Dec 2022 12:50:48 -0500 |
parents | 1a0756f7c90a |
children | ad014fc78bd6 c6d54dd31a7e |
line wrap: on
line diff
--- a/libgui/src/main-window.cc Wed Nov 30 08:02:24 2022 -0500 +++ b/libgui/src/main-window.cc Thu Dec 01 12:50:48 2022 -0500 @@ -2170,7 +2170,7 @@ base_name.replace ("___octave_amp_replacement___", "&&"); // remember names with and without shortcut - m_hash_menu_text[menu] = QStringList () << name << base_name; + m_hash_menu_text[menu] = QStringList ({ name, base_name }); return menu; } @@ -2196,15 +2196,16 @@ #if defined (HAVE_QSCINTILLA) // call the editor to add actions which should also be available in the // editor's menu and tool bar - QList<QAction *> shared_actions; - shared_actions << m_new_script_action - << m_new_function_action - << m_open_action - << m_find_files_action - << m_undo_action - << m_copy_action - << m_paste_action - << m_select_all_action; + QList<QAction *> shared_actions = { + m_new_script_action, + m_new_function_action, + m_open_action, + m_find_files_action, + m_undo_action, + m_copy_action, + m_paste_action, + m_select_all_action + }; m_editor_window->insert_global_actions (shared_actions); #endif }