Details
-
Bug
-
Resolution: Done
-
P4: Low
-
5.1.1
-
None
-
Open SuSe / Linux
-
4758555f3e44af3425f0b691dc38fb40f3c9413d
Description
As extracted from the documentation, QSettings tries to read config files for an application "Star Runner" from company "MySoft" from the following locations:
1. $HOME/.config/MySoft/Star Runner.conf
2. $HOME/.config/MySoft.conf
3. $XDG_CONFIG_HOME/MySoft/Star Runner.conf
4. $XDG_CONFIG_HOME/etc/xdg/MySoft.conf
(where $XDG_CONFIG_HOME defaults to /etc/xdg).
I.e. first the user settings (1. and 2.) and then the systen-wide settings (3. and 4.).
The XDG Base directory specification(http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html) states, that user-specific settings are located by XDG_CONFIG_HOME, and additional search paths (system-wide) are stored in XDG_CONFIG_DIRS.
So, according to this standard, the correct search list would be
1. $XDG_CONFIG_HOME/MySoft/Star Runner.conf
2. $XDG_CONFIG_HOME/MySoft.conf
3. foreach (d, $XDG_CONFIG_DIRS) d/MySoft/Star Runner.conf
4. foreach (d, $XDG_CONFIG_DIRS) d/MySoft.conf
Where XDG_CONFIG_HOME defaults to $HOME/.config and XDF_CONDIF_DIRS to /etc/xdg.