diff libgui/src/gui-preferences-global.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 291994766c55
children 6dfaaf8ecf3b 597f3ee61a48
line wrap: on
line diff
--- a/libgui/src/gui-preferences-global.h	Wed Nov 30 08:02:24 2022 -0500
+++ b/libgui/src/gui-preferences-global.h	Thu Dec 01 12:50:48 2022 -0500
@@ -93,26 +93,29 @@
 }  ;
 
 const QStringList
-global_icon_paths (QStringList ()
-                        << ""
-                        << ":/icons/octave/128x128/"
-                        << ":/icons/tango/128x128/"
-                        << ":/icons/cursors/"
-                       );
+global_icon_paths = {
+  "",
+  ":/icons/octave/128x128/",
+  ":/icons/tango/128x128/",
+  ":/icons/cursors/"
+};
 
 const gui_pref
 global_icon_theme_index ("icon_theme", QVariant (ICON_THEME_SYSTEM));
 const QStringList
-global_all_icon_themes (QStringList ()
-                        << ""
-                        << "octave"
-                        << "tango"
-                        << "cursors");
+global_all_icon_themes = {
+  "",
+  "octave",
+  "tango",
+  "cursors"
+};
+
 const QStringList
-global_all_icon_theme_names (QStringList ()
-                        << "System"
-                        << "Octave"
-                        << "Tango");
+global_all_icon_theme_names = {
+  "System",
+  "Octave",
+  "Tango"
+};
 
 const gui_pref
 global_status_bar ("show_status_bar", QVariant (true));
@@ -123,8 +126,9 @@
   EXTRA_STYLE_FUSION_DARK = 0
 }  ;
 const QStringList
-global_extra_styles (QStringList ()
-                        << "Fusion-Dark");
+global_extra_styles = {
+  "Fusion-Dark"
+};
 
 #if defined (Q_OS_MAC)
 // prevent native file dialogs on MAC by setting the default "false" and
@@ -180,12 +184,12 @@
 global_proxy_pass ("proxyPassword", QVariant (QString ()));
 
 const QStringList
-global_proxy_all_types (QStringList ()
-                        << "HttpProxy"
-                        << "Socks5Proxy"
-                        << QT_TRANSLATE_NOOP ("octave::settings_dialog", "Environment Variables")
-                       );
-const QList<int>
-global_proxy_manual_types (QList<int> () << 0 << 1);
+global_proxy_all_types = {
+  "HttpProxy",
+  "Socks5Proxy",
+  QT_TRANSLATE_NOOP ("octave::settings_dialog", "Environment Variables")
+};
+
+const QList<int> global_proxy_manual_types = { 0, 1 };
 
 #endif