Backporting changes from LXQT's QtXDG library