Accoring to freedesktop XDG env should be prefered to use to save data.
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
Accoring to freedesktop XDG env should be prefered to use to save data.
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
No Linters Available |
No Unit Test Coverage |
XDG_*_HOME are not mandatory. If XDG_DATA_HOME is not set, the users will get errors when starting Akonadi for the first time.
well at least the freedesktop documentation says, that if XDG_DATA_HOME is not available it should be replaced with $HOME/.local/share.
I search a little bit around and found, that KConfig is using qgetenv to replace a environemt variable to its content - What is a simple call of getenv, so at least I see that we really won't replace XDG_DATA_HOME with any usefull if, the env variable is not set.
As qgetenv/getenv does not handle shell features like ${XDG_DATA_HOME:=~/.local/share} another solution may be:
if the Path config var is a relative path prepend ${XDG_DATA_HOME:=~/.local/share}
This would need some logic when reading and writing the Path variable.
(Maybe there exists an XDG_* helper class for QT as it exists for python?)
Achim
Well the support is now entering kconfig https://git.reviewboard.kde.org/r/127462/
With that in place we can easily use $QT_DATA_HOME