Mercurial > octave
comparison libgui/src/resource-manager.cc @ 27893:465ac679e976
Fix typos and grammar errors in comments in libgui (patch #9790)
* color-picker.cc, documentation.cc, dw-main-window.cc, files-dock-widget.cc,
gui-preferences-mw.h, history-dock-widget.h, file-editor-tab.cc,
file-editor-tab.h, file-editor.cc, find-dialog.cc, octave-qscintilla.cc,
main-window.cc, octave-dock-widget.cc, octave-dock-widget.h,
resource-manager.cc, shortcut-manager.cc, tab-bar.cc, tab-bar.h,
variable-editor.cc, variable-editor.h, workspace-model.cc, workspace-view.cc:
Fix typos and grammar errors in comments.
author | Andrew Janke <andrew@apjanke.net> |
---|---|
date | Thu, 11 Apr 2019 07:37:20 -0400 |
parents | f68c7c56e5f2 |
children | b442ec6dda5c |
comparison
equal
deleted
inserted
replaced
27892:77320d48b33e | 27893:465ac679e976 |
---|---|
90 { | 90 { |
91 // File does not exist yet: Look for a settings file at the old | 91 // File does not exist yet: Look for a settings file at the old |
92 // location ($HOME/.config/octave/qt-settings) for impoting all | 92 // location ($HOME/.config/octave/qt-settings) for impoting all |
93 // available keys into the new settings file. | 93 // available keys into the new settings file. |
94 // Do not look for an old settings file if XDG_CONFIG_HOME is set, | 94 // Do not look for an old settings file if XDG_CONFIG_HOME is set, |
95 // since then a non-existin new settings file does not necessarily | 95 // since then a nonexistent new settings file does not necessarily |
96 // indicate a first run of octave with new config file locations. | 96 // indicate a first run of octave with new config file locations. |
97 #if defined (HAVE_QSTANDARDPATHS) | 97 #if defined (HAVE_QSTANDARDPATHS) |
98 QString home_path | 98 QString home_path |
99 = QStandardPaths::writableLocation (QStandardPaths::HomeLocation); | 99 = QStandardPaths::writableLocation (QStandardPaths::HomeLocation); |
100 #else | 100 #else |
107 | 107 |
108 QFile ofile (old_settings_file); | 108 QFile ofile (old_settings_file); |
109 | 109 |
110 if (ofile.exists ()) | 110 if (ofile.exists ()) |
111 { | 111 { |
112 // Old settings file exists, create a gui_settings object related | 112 // Old settings file exists; create a gui_settings object related |
113 // to it and copy all available keys to the new settings | 113 // to it and copy all available keys to the new settings |
114 gui_settings old_settings (old_settings_file, QSettings::IniFormat); | 114 gui_settings old_settings (old_settings_file, QSettings::IniFormat); |
115 | 115 |
116 QStringList keys = old_settings.allKeys (); | 116 QStringList keys = old_settings.allKeys (); |
117 for (int i = 0; i < keys.count(); i++) | 117 for (int i = 0; i < keys.count(); i++) |
375 { | 375 { |
376 // If system icon theme is not desired, take own icon files | 376 // If system icon theme is not desired, take own icon files |
377 if (! m_settings->value (global_icon_theme).toBool ()) | 377 if (! m_settings->value (global_icon_theme).toBool ()) |
378 return QIcon (":/actions/icons/" + icon_name + ".png"); | 378 return QIcon (":/actions/icons/" + icon_name + ".png"); |
379 | 379 |
380 // Use system icon theme with own files as fallback except the fallback is | 380 // Use system icon theme with own files as fallback except when the |
381 // explicitly disabled (fallback=false) | 381 // fallback is explicitly disabled (fallback=false) |
382 if (fallback) | 382 if (fallback) |
383 return QIcon::fromTheme (icon_name, | 383 return QIcon::fromTheme (icon_name, |
384 QIcon (":/actions/icons/" + icon_name + ".png")); | 384 QIcon (":/actions/icons/" + icon_name + ".png")); |
385 else | 385 else |
386 return QIcon::fromTheme (icon_name); | 386 return QIcon::fromTheme (icon_name); |