Mercurial > octave
diff libgui/src/resource-manager.cc @ 23717:06579337237b
move configuration variables inside octave::config namespace
* defaults.h, defaults.in.cc: Define access functions for
configuration variables inside octave::config namespace and make
variables static inside defaults.cc, effectively making these values
read-only for users. Change all uses.
A few variables that may be modified by users remain in the global
namespace. These may be moved later.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 29 Jun 2017 02:33:19 -0400 |
parents | 21baad6b35c4 |
children | 980f39c3ab90 |
line wrap: on
line diff
--- a/libgui/src/resource-manager.cc Wed Jun 28 23:58:38 2017 -0400 +++ b/libgui/src/resource-manager.cc Thu Jun 29 02:33:19 2017 -0400 @@ -55,8 +55,9 @@ std::string dsf = octave::sys::env::getenv ("OCTAVE_DEFAULT_QT_SETTINGS"); if (dsf.empty ()) - dsf = Voct_etc_dir + octave::sys::file_ops::dir_sep_str () + - "default-qt-settings"; + dsf = (octave::config::oct_etc_dir () + + octave::sys::file_ops::dir_sep_str () + + "default-qt-settings"); return QString::fromStdString (dsf); } @@ -93,7 +94,7 @@ // get environment variable for the locale dir (e.g. from run-octave) std::string dldir = octave::sys::env::getenv ("OCTAVE_LOCALE_DIR"); if (dldir.empty ()) - dldir = Voct_locale_dir; // env-var empty, load the default location + dldir = octave::config::oct_locale_dir (); // env-var empty, load the default location return QString::fromStdString (dldir); }