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) ...@@ -88,7 +88,7 @@ QString XdgUrl::_convertPathString(const QString &path)
newPath.replace("$XDG_DATA", Utility::File::xdgDataHomePath()); newPath.replace("$XDG_DATA", Utility::File::xdgDataHomePath());
} }
else if (newPath.contains("$KDE_DATA")) { else if (newPath.contains("$KDE_DATA")) {
newPath.replace("$KDE_DATA", Utility::File::kdeDataHomePath()); newPath.replace("$KDE_DATA", Utility::File::kdehomePath());
} }
return newPath; return newPath;
......
...@@ -63,14 +63,13 @@ QString File::xdgCacheHomePath() ...@@ -63,14 +63,13 @@ QString File::xdgCacheHomePath()
* https://userbase.kde.org/KDE_System_Administration/Environment_Variables * 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()); QString path = QString::fromLocal8Bit(qgetenv("KDEHOME").constData());
if (path.isEmpty()) { if (path.isEmpty()) {
path = homePath() + "/.kde"; path = homePath() + "/.kde";
} }
path += "/share";
return path; return path;
} }
......
...@@ -21,7 +21,7 @@ public: ...@@ -21,7 +21,7 @@ public:
static QString xdgDataHomePath(); static QString xdgDataHomePath();
static QString xdgConfigHomePath(); static QString xdgConfigHomePath();
static QString xdgCacheHomePath(); static QString xdgCacheHomePath();
static QString kdeDataHomePath(); static QString kdehomePath();
static QFileInfoList readDir(const QString &path); static QFileInfoList readDir(const QString &path);
static bool makeDir(const QString &path); static bool makeDir(const QString &path);
static QString readText(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