Make sure that the KDE prefix comes first in XDG_DATA_DIRS
Review Request #109675 - Created March 23, 2013 and submitted
Planned commit message: Make sure that the KDE prefix comes first in XDG_DATA_DIRS. I tracked down a Nepomuk problem to this. Nepomuk file indexing didn't work because the ontologies were too old. Nepomuk loaded ontologies from /usr/share instead of my KDE prefix /opt/kde4/share, because /opt/kde4 was the very last entry in the respective search list in KStandardDirs. The first entries in that search list all came from XDG_DATA_DIRS, which in my case (Kubuntu) is set by the X session initialization scripts. That is before startkde runs, so startkde never touched XDG_DATA_DIRS. But it should, and now it does.
I like the idea, but I would prefer using @SHARE_INSTALL_PREFIX@ instead of `kde4-config --prefix` (including in the existing line of code). startkde.cmake is already pre-processed to replace such vars with their value, which makes this faster at runtime, and removes a dependency on kde4-config (in preparation for KF5).
Seems like a good idea to me. I cannot have a "Ship it" as I'm not familiar with the code. Btw, I just checked and I have a `prepend XDG_DATA_DIRS $KDEDIR/share` in my KDE environment variables, that is probably why I never encountered this.