Bug 340508

Summary: Mulitple Search paths Plasma 5 with kde4 apps
Product: [Applications] khelpcenter Reporter: Scarlett Moore <sgmoore>
Component: generalAssignee: Documentation Editorial Team <kde-doc-english>
Status: RESOLVED NOT A BUG    
Severity: normal CC: aacid, arthur, rdieter, simonandric5
Priority: NOR    
Version: 5.1.0   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Scarlett Moore 2014-10-30 19:02:59 UTC
Currently we offer Plasma 5 desktop that also contains KDE4 Apps as most apps have not been ported to KF5 yet and none have a released KF5 port. The problem is that Plasma 5 Khelpcenter uses QStandardDIrs aka here are the two config files:

khelpcenter.kcfg in Plasma5
<group name="Search">
<entry type="Path" key="IndexDirectory">
<label>Path to index directory.</label>
<whatsthis>Path to directory containing search indices.</whatsthis>
<default code="true">QStandardPaths::writableLocation(QStandardPaths::DataLocation) + QStringLiteral("/khelpcenter/index/")</default>
</entry>

khelpcenter.kcfg in kde4
<group name="Search">
<entry type="Path" key="IndexDirectory">
<label>Path to index directory.</label>
<whatsthis>Path to directory containing search indices.</whatsthis>
<default code="true">KGlobal::dirs()->saveLocation("data", "khelpcenter/index/")</default>
</entry>

So all of the kde4 apps show Documentation missing because khelpcenter is looking for doc files in /usr/share/doc/HTML

Whereas KDE4 docs are located in:
/usr/share/doc/kde/HTML

Is there a way to set multiple search paths in khelpcenterrc or any ideas really.

Reproducible: Always

Steps to Reproduce:
1. Open khelpcenter via Help in any KDE4 app
2. Documentation Not found
3. Must be using Plasma 5

Actual Results:  
Failure to get documentation

Expected Results:  
Read Help documentation!
Comment 1 Albert Astals Cid 2014-11-25 22:53:04 UTC
I don't think the index config has anything to do here, it's just were to write the index, no?
Comment 2 Scarlett Moore 2014-12-13 23:52:46 UTC
I don't know. All I know is in plasma 5 the documentation is located in 
/usr/share/doc/HTML/en I am guessing XDG path

All KDE4 apps have there docs in /usr/share/doc/kde/HTML/en

So in Plasma5 the kde4 path is never searched for docs and documentation not found is the result.
The index config files were the only files I could find that had any pointers as to where khelpcenter should look for files that I could find, I may and probably am way off base...
Comment 3 Rex Dieter 2014-12-14 00:10:50 UTC
The extra "kde" inserted there must be a customization of your distro (and not the default)
Comment 4 Albert Astals Cid 2014-12-14 00:12:56 UTC
I thought you had tested the patch, i guess you haven't then?
Comment 5 Scarlett Moore 2014-12-14 00:16:47 UTC
Patch? There is no patch here. Just examples.

@Rex Dieter : I will look into your theory. AFAIK we ( kubuntu / debian ) do not alter these paths, I will will have take a look and see if some under the hood tooling is.

thanks,
Scarlett
Comment 6 Rex Dieter 2014-12-14 00:32:06 UTC
https://patches.ubuntu.com/k/kde4libs/kde4libs_4:4.14.2-4~ubuntu3.patch

includes snippet:
 	    -DHTML_INSTALL_DIR=/usr/share/doc/kde/HTML \
which overrides the default value
Comment 7 Scarlett Moore 2014-12-14 00:38:36 UTC
Ah ha, yep there it is. So this is a distro problem and not KDE. Thanks for the help. Off to yell at other people!
Comment 8 Rex Dieter 2014-12-14 00:53:21 UTC
Well, it wouldn't be a bad idea for khelpcenter to support multiple paths.