diff libgui/src/gui-preferences-ed.h @ 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 c8ad083a5802
children aae24eaf89ad 597f3ee61a48
line wrap: on
line diff
--- a/libgui/src/gui-preferences-ed.h	Wed Nov 30 08:02:24 2022 -0500
+++ b/libgui/src/gui-preferences-ed.h	Thu Dec 01 12:50:48 2022 -0500
@@ -180,7 +180,13 @@
 ed_last_comment_str ("editor/oct_last_comment_str");
 
 const QStringList
-ed_comment_strings (QStringList () << "##" << "#" << "%"<< "%%" << "%!");
+ed_comment_strings = {
+  "##",
+  "#",
+  "%",
+  "%%",
+  "%!"
+};
 
 const int ed_comment_strings_count = 5;
 
@@ -206,11 +212,12 @@
 
 // Tabs
 const QStringList
-ed_tab_position_names (QStringList ()
-                       << QT_TRANSLATE_NOOP ("octave::settings_dialog", "Top")
-                       << QT_TRANSLATE_NOOP ("octave::settings_dialog", "Bottom")
-                       << QT_TRANSLATE_NOOP ("octave::settings_dialog", "Left")
-                       << QT_TRANSLATE_NOOP ("octave::settings_dialog", "Right"));
+ed_tab_position_names = {
+  QT_TRANSLATE_NOOP ("octave::settings_dialog", "Top"),
+  QT_TRANSLATE_NOOP ("octave::settings_dialog", "Bottom"),
+  QT_TRANSLATE_NOOP ("octave::settings_dialog", "Left"),
+  QT_TRANSLATE_NOOP ("octave::settings_dialog", "Right")
+};
 
 const gui_pref
 ed_tab_position ("editor/tab_position", QVariant (QTabWidget::North));