Mercurial > octave
comparison 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 |
comparison
equal
deleted
inserted
replaced
31596:e03694e047fa | 31599:50a225732661 |
---|---|
91 ICON_THEME_TANGO, | 91 ICON_THEME_TANGO, |
92 ICON_THEME_CURSORS | 92 ICON_THEME_CURSORS |
93 } ; | 93 } ; |
94 | 94 |
95 const QStringList | 95 const QStringList |
96 global_icon_paths (QStringList () | 96 global_icon_paths = { |
97 << "" | 97 "", |
98 << ":/icons/octave/128x128/" | 98 ":/icons/octave/128x128/", |
99 << ":/icons/tango/128x128/" | 99 ":/icons/tango/128x128/", |
100 << ":/icons/cursors/" | 100 ":/icons/cursors/" |
101 ); | 101 }; |
102 | 102 |
103 const gui_pref | 103 const gui_pref |
104 global_icon_theme_index ("icon_theme", QVariant (ICON_THEME_SYSTEM)); | 104 global_icon_theme_index ("icon_theme", QVariant (ICON_THEME_SYSTEM)); |
105 const QStringList | 105 const QStringList |
106 global_all_icon_themes (QStringList () | 106 global_all_icon_themes = { |
107 << "" | 107 "", |
108 << "octave" | 108 "octave", |
109 << "tango" | 109 "tango", |
110 << "cursors"); | 110 "cursors" |
111 }; | |
112 | |
111 const QStringList | 113 const QStringList |
112 global_all_icon_theme_names (QStringList () | 114 global_all_icon_theme_names = { |
113 << "System" | 115 "System", |
114 << "Octave" | 116 "Octave", |
115 << "Tango"); | 117 "Tango" |
118 }; | |
116 | 119 |
117 const gui_pref | 120 const gui_pref |
118 global_status_bar ("show_status_bar", QVariant (true)); | 121 global_status_bar ("show_status_bar", QVariant (true)); |
119 | 122 |
120 | 123 |
121 enum | 124 enum |
122 { | 125 { |
123 EXTRA_STYLE_FUSION_DARK = 0 | 126 EXTRA_STYLE_FUSION_DARK = 0 |
124 } ; | 127 } ; |
125 const QStringList | 128 const QStringList |
126 global_extra_styles (QStringList () | 129 global_extra_styles = { |
127 << "Fusion-Dark"); | 130 "Fusion-Dark" |
131 }; | |
128 | 132 |
129 #if defined (Q_OS_MAC) | 133 #if defined (Q_OS_MAC) |
130 // prevent native file dialogs on MAC by setting the default "false" and | 134 // prevent native file dialogs on MAC by setting the default "false" and |
131 // setting the flag for ignoring the pref to "true" (3rd argument) | 135 // setting the flag for ignoring the pref to "true" (3rd argument) |
132 const gui_pref | 136 const gui_pref |
178 global_proxy_user ("proxyUserName", QVariant (QString ())); | 182 global_proxy_user ("proxyUserName", QVariant (QString ())); |
179 const gui_pref | 183 const gui_pref |
180 global_proxy_pass ("proxyPassword", QVariant (QString ())); | 184 global_proxy_pass ("proxyPassword", QVariant (QString ())); |
181 | 185 |
182 const QStringList | 186 const QStringList |
183 global_proxy_all_types (QStringList () | 187 global_proxy_all_types = { |
184 << "HttpProxy" | 188 "HttpProxy", |
185 << "Socks5Proxy" | 189 "Socks5Proxy", |
186 << QT_TRANSLATE_NOOP ("octave::settings_dialog", "Environment Variables") | 190 QT_TRANSLATE_NOOP ("octave::settings_dialog", "Environment Variables") |
187 ); | 191 }; |
188 const QList<int> | 192 |
189 global_proxy_manual_types (QList<int> () << 0 << 1); | 193 const QList<int> global_proxy_manual_types = { 0, 1 }; |
190 | 194 |
191 #endif | 195 #endif |