Skip to content
Snippets Groups Projects
Commit 09899685 authored by akiraohgaki's avatar akiraohgaki
Browse files

Change kdeDataHomePath() method to kdehomePath() and it's return $KDEHOME

parent 7273a3e3
No related branches found
No related tags found
No related merge requests found
......@@ -88,7 +88,7 @@ QString XdgUrl::_convertPathString(const QString &path)
newPath.replace("$XDG_DATA", Utility::File::xdgDataHomePath());
}
else if (newPath.contains("$KDE_DATA")) {
newPath.replace("$KDE_DATA", Utility::File::kdeDataHomePath());
newPath.replace("$KDE_DATA", Utility::File::kdehomePath());
}
return newPath;
......
......@@ -63,14 +63,13 @@ QString File::xdgCacheHomePath()
* https://userbase.kde.org/KDE_System_Administration/Environment_Variables
*/
QString File::kdeDataHomePath()
QString File::kdehomePath()
{
// KDE 4
// KDE 4 maybe uses $KDEHOME
QString path = QString::fromLocal8Bit(qgetenv("KDEHOME").constData());
if (path.isEmpty()) {
path = homePath() + "/.kde";
}
path += "/share";
return path;
}
......
......@@ -21,7 +21,7 @@ public:
static QString xdgDataHomePath();
static QString xdgConfigHomePath();
static QString xdgCacheHomePath();
static QString kdeDataHomePath();
static QString kdehomePath();
static QFileInfoList readDir(const QString &path);
static bool makeDir(const QString &path);
static QString readText(const QString &path);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment