Review Request 120595: Build correct QUrl path when KHelpClient::invokeHelp is called
Simon Wächter
waechter.simon at gmail.com
Wed Oct 15 21:38:20 UTC 2014
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/120595/
-----------------------------------------------------------
(Updated Okt. 15, 2014, 11:38 nachm.)
Status
------
This change has been marked as submitted.
Review request for KDE Frameworks and David Faure.
Repository: kconfigwidgets
Description
-------
During the port of KAppTemplate to KF5 I encountered a problem with the help invokation by hand - KAppTemplate has a help button in the main window/widget. These methods were used:
KDE4: KToolInvocation::invokeHelp("kapptemplate-init", "kapptemplate");
KF5: KHelpClient::invokeHelp("kapptemplate-init", "kapptemplate"); + Application name is set
In KDE 4 it worked without a problem, but as soon it was ported to KF5 it stopped working. So I debugged the method and saw, that the URL for calling the help page has this (wrong) format:
http://kapptemplate/index.html?anchor=kapptemplate-index
So, because the help address is an http-Url, I wrote a fix and the final URL now looks like this:
help:/kapptemplate/index.html?anchor=kapptemplate-index
This URL is KHelpCenter-valid and will call KHelpCenter. You can also take a look at the else part of that line: If no application is given, _appname is used and inserted in the correct url.
As addition: As mentioned, the correct path might (is ?) not correct. But the problem is still, that if docPath has some content (In this case: "kapptemplate/index.html"), the url is interpreted as http one.
Diffs
-----
src/khelpclient.cpp 09a3167
Diff: https://git.reviewboard.kde.org/r/120595/diff/
Testing
-------
Testing was done under a project neon 5 system and with the current master branch of KConfigWidgets from git. Before installing the patched library, the help menu was not invokable from the KAppTemplate application. After installing the patching library it was.
Also tested it with Kate help menu item from the "Settings" menu. It is also callable from "Settings" --> "Configure Kate" --> "Help" (Bottom left").
Thanks,
Simon Wächter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20141015/62483ff9/attachment.html>
More information about the Kde-frameworks-devel
mailing list