Replace getenv("HOME") by RDGetHomeDir() in RDMonitorConfig::RDMonitorConfig

This commit is contained in:
Alban Peignier 2014-09-05 09:58:49 +02:00
parent dd2fb90856
commit c3e5f54083

View File

@ -28,13 +28,17 @@
#include <rdprofile.h>
#include <rdmonitor_config.h>
#include <rdconf.h>
RDMonitorConfig::RDMonitorConfig()
{
clear();
mon_filename="/.rdmonitorrc";
if(getenv("HOME")!=NULL) {
mon_filename=QString(getenv("HOME"))+mon_filename;
bool home_found = false;
QString home = RDGetHomeDir(&home_found);
if (home_found) {
mon_filename=home+mon_filename;
}
}