diff options
author | Slávek Banko <[email protected]> | 2013-05-15 19:43:45 +0200 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2013-05-15 19:44:16 +0200 |
commit | 46fd5cba30603e692585d81ad4f1824231fd86b6 (patch) | |
tree | 6defa0fd710611c47a393e8fb2bf6647fe4e2b67 /tderandr/libtderandr.cc | |
parent | 665b4e5b8074656630e660aafaec93586edaaecb (diff) | |
download | tdelibs-46fd5cba30603e692585d81ad4f1824231fd86b6.tar.gz tdelibs-46fd5cba30603e692585d81ad4f1824231fd86b6.zip |
Properly fix getting file name with ICC configuration
Diffstat (limited to 'tderandr/libtderandr.cc')
-rw-r--r-- | tderandr/libtderandr.cc | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/tderandr/libtderandr.cc b/tderandr/libtderandr.cc index a22bd08b8..9b7e25577 100644 --- a/tderandr/libtderandr.cc +++ b/tderandr/libtderandr.cc @@ -83,14 +83,8 @@ TQString KRandrSimpleAPI::getIccFileName(TQString profileName, TQString screenNa TQStringList t_cfgProfiles; TQString retval; - if (profileName != NULL) { + if ((profileName != NULL) && (profileName != "")) { t_config = new KSimpleConfig( TQString::fromLatin1( "kiccconfigrc" )); - } - else { - t_systemconfig = new KSimpleConfig( kde_confdir + TQString("/kicc/kiccconfigrc") ); - } - - if (profileName != NULL) { t_config->setGroup(NULL); if (t_config->readBoolEntry("EnableICC", false) == true) { t_config->setGroup(profileName); @@ -99,8 +93,10 @@ TQString KRandrSimpleAPI::getIccFileName(TQString profileName, TQString screenNa else { retval = ""; } + delete t_config; } else { + t_systemconfig = new KSimpleConfig( kde_confdir + TQString("/kicc/kiccconfigrc") ); t_systemconfig->setGroup(NULL); if (t_systemconfig->readBoolEntry("EnableICC", false) == true) { retval = t_systemconfig->readEntry("ICCFile"); @@ -108,17 +104,7 @@ TQString KRandrSimpleAPI::getIccFileName(TQString profileName, TQString screenNa else { retval = ""; } - } - - if (profileName != "") { - if (t_config) { - delete t_config; - } - } - else { - if (t_systemconfig) { - delete t_systemconfig; - } + delete t_systemconfig; } return retval; |