diff options
author | Maximilian Gerhard <maxbox@directbox.com> | 2012-06-23 22:37:59 +0200 |
---|---|---|
committer | Andreas Loibl <andreas@andreas-loibl.de> | 2012-10-11 22:52:57 +0200 |
commit | 2c3df0c30e558aae197ccb7eecaa77ecdcecceb4 (patch) | |
tree | c7bb4a1eafd2447f3855f24c3f3e48d41d8bac5c | |
parent | 9d8c72609f97d640547bfaf965c939c3450293cf (diff) | |
download | acritoxinstaller-2c3df0c30e558aae197ccb7eecaa77ecdcecceb4.zip acritoxinstaller-2c3df0c30e558aae197ccb7eecaa77ecdcecceb4.tar.gz |
better QSettings usage to find correct config
Changed usage of QSettings here. It will use now the internal
fallback mechanism to find configuration files. It will respect
user and system-wide configuration, where user defined settings
have higher priority than system-wide. (see
http://qt-project.org/doc/qt-4.8/qsettings.html for more details)
-rw-r--r-- | lxdesupport.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lxdesupport.cpp b/lxdesupport.cpp index 859c420..4a1c825 100644 --- a/lxdesupport.cpp +++ b/lxdesupport.cpp @@ -28,12 +28,7 @@ void LXDESupport::load() if(qgetenv("XDG_CURRENT_DESKTOP") != "LXDE") return; - QString conf_path = qgetenv("XDG_CONFIG_HOME"); - if(conf_path.isEmpty()) - conf_path = QDir::homePath() + "/.config"; - conf_path.append("/lxsession/LXDE/desktop.conf"); - - QSettings lxde_settings(conf_path, QSettings::IniFormat); + QSettings lxde_settings("lxsession/LXDE", "desktop"); QString themeName = lxde_settings.value("GTK/sNet/IconThemeName").toString(); if(!themeName.isEmpty()) QIcon::setThemeName(themeName); |