View previous topic :: View next topic |
Author |
Message |
genterminl Guru
Joined: 12 Feb 2005 Posts: 523 Location: Connecticut, USA
|
Posted: Sun Jan 14, 2018 2:45 am Post subject: Where does KDE look for app manuals |
|
|
To start, I know I'm doing something probably not particularly supported, but I've had it working sufficiently for quite a while, and have only now run into a new problem. My KDE is mostly Frameworks based, but I have one application which is still KDE4 based. I'm actually working with the development team on the final legs of the first frameworks release. I have the KDE4 version installed from a regular ebuild. In order to also be able to run the Frameworks version for testing, I do "cmake -Dprefix=/path/to/test/install/area /path/to/app/git/source" while in the build dir. I then have a script that prepends the new install area to several KDE and XDG environment variables, runs ksyscoca5, and launches the app from the new install area. So far, it has worked fine, finding all the new libraries and plugins and icons and such. However, today, I discovered that when I have it launch the handbook with khelpcenter, it opens the version of my regular installed KDE4 version. I have confirmed that the newly compiled index.docbook (and all associated help files) are installed under the new install area.
My assumption is that I have simply missed prepending the new area at the front of some environment variable, or perhaps failed to clear out some cache. In playing with strace, I see it looking in ~/.cache/khelpcenter - but even removing that whole folder does not help, and it immediately gets repopulated with the old version of index.docbook as soon as I request the handbook.
Any ideas what I've missed? Is there a place to see the complete list of how KDE decides where to look for such things? I've seen https://userbase.kde.org/KDE_System_Administration/Environment_Variables but can't find anything there that helps.
Thanks for any suggestions (other than just to give up.....)
Jack |
|
Back to top |
|
|
kensington Developer
Joined: 02 Jan 2013 Posts: 177 Location: Australia
|
Posted: Sun Jan 14, 2018 7:16 am Post subject: |
|
|
From khelpcenter:view.cpp:
Code: | #if KCOREADDONS_VERSION >= QT_VERSION_CHECK(5, 36, 0)
// retrieve the local search path
const QStringList localDoc = KDocTools::documentationDirs();
#else
...
|
If you have an up-to-date system, this will be true.
From kdoctools:src/xslt.cpp:
Code: | QStringList KDocTools::documentationDirs()
{
/* List of paths containing documentation */
return QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("doc/HTML"), QStandardPaths::LocateDirectory);
} |
According to the Qt docs, QStandardPaths::GenericDataLocation means "~/.local/share", "/usr/local/share", "/usr/share".
So, it looks like these paths are hard-coded and cannot be overwritten with environment variables. |
|
Back to top |
|
|
genterminl Guru
Joined: 12 Feb 2005 Posts: 523 Location: Connecticut, USA
|
Posted: Sun Jan 14, 2018 7:51 pm Post subject: |
|
|
Thanks, but I'm not quite convinced. I read that doc as saying those are examples, not an absolute list. In the source for qt-core, look in qtbase-opensource-src-5.7.1/src/corelib/io/qstandardpaths_unix.cpp. There is a section near the end of the file where it looks like GenericDataLocation actually returns xdgDataDirs(), which earlier in the file is set from QFile::decodeName(qgetenv("XDG_DATA_DIRS").
So - how do I figure out how I'm misreading the source, or else why it's not seeming to actually look in XDG_DATA_DIRS. (I've also set XDG_DATA_HOME, with no change in effect.)[/list] |
|
Back to top |
|
|
kensington Developer
Joined: 02 Jan 2013 Posts: 177 Location: Australia
|
Posted: Mon Jan 15, 2018 12:20 pm Post subject: |
|
|
You're right, something funny is definitely going on.
I set a custom XDG_DATA_DIRS and moved a random docbook there. I see in strace the docbook being read, but still documentationnotfound is displayed instead. I'm starting to think now the problem is in kio_help, however I didn't have time to pick it apart in detail. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|