Use qputenv/qgetenv from Qt for better cross compatibility

This commit is contained in:
Christophe Dumez
2011-10-02 17:04:16 +03:00
parent aae85b4498
commit 2f7b20c704
4 changed files with 8 additions and 24 deletions

View File

@@ -197,7 +197,7 @@ public:
return save_path;
// Default save path on Linux
QString config_path = QString::fromLocal8Bit(getenv("XDG_CONFIG_HOME"));
QString config_path = QString::fromLocal8Bit(qgetenv("XDG_CONFIG_HOME").constData());
if (config_path.isEmpty())
config_path = QDir::home().absoluteFilePath(".config");