lxqt / libqtxdg

Qt implementation of freedesktop.org xdg specs
https://lxqt.github.io
GNU Lesser General Public License v2.1
72 stars 35 forks source link

Avoid hard-coded paths #202

Closed ghost closed 4 years ago

luis-pereira commented 4 years ago

@voidpin The hard-coded paths you refer are defined in the XDG Base Directory Specification. We are just following specification.

The hard-coded values are fallback values used only when the corresponding environment variables are not set. Fallback values are immutable. See here and here.

${PREFIX} is defined in the CMakeLists.txt. It's value is not resolved in the C++ code. The resulting dir will be literally be: ${PREFIX}/share.

The correct way to change the values is to set the XDG_DATA_DIRS and XDG_CONFIG_DIRS environment variables.