Review Request 115959: Resurrect KConfigDialog::setHelp (used to come from KDialog). Move KHelpClient down from kxmlgui, for use in KConfigDialog.

David Faure faure at kde.org
Fri Feb 28 07:33:22 UTC 2014



> On Feb. 24, 2014, 9:22 p.m., Albert Astals Cid wrote:
> > src/khelpclient.cpp, line 76
> > <https://git.reviewboard.kde.org/r/115959/diff/2/?file=245608#file245608line76>
> >
> >     url is always help:/ isn't it? Not sure i understand the comment
> 
> David Faure wrote:
>     ? Not sure I understand *your* comment :-)
>     
>     
>         QUrl url;
>         if (!docPath.isEmpty()) {
>             url = QUrl(QLatin1String("help:/")).resolved(QUrl::fromUserInput(docPath));
>         } else {
>             url = QUrl(QString::fromLatin1("help:/%1/index.html").arg(appname));
>         }
>     
>         if (!anchor.isEmpty()) {
>             QUrlQuery query(url);
>             query.addQueryItem(QString::fromLatin1("anchor"), anchor);
>             url.setQuery(query);
>         }
>     
>     How is this "always help:/" ? There much stuff after that, in the path and possibly in the query.
>
> 
> Albert Astals Cid wrote:
>     I mean "starts always with help:/", sorry. And if it always starts with help, the comment
>     // launch khelpcenter, or a browser for URIs not handled by khelpcenter
>     is a bit weird, since it's always the same kind of URIs, no?
>

Ah, I see.

No, the docPath (from the .desktop file) can be an absolute URL, and something like QUrl("help:/").resolved("http://www.kde.org") gives "http://www.kde.org".
(the point of the call to resolved is to handle relative urls, but it also handles absolute urls by just returning that).


- David


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115959/#review50765
-----------------------------------------------------------


On Feb. 23, 2014, 11 a.m., David Faure wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/115959/
> -----------------------------------------------------------
> 
> (Updated Feb. 23, 2014, 11 a.m.)
> 
> 
> Review request for KDE Frameworks and Albert Astals Cid.
> 
> 
> Repository: kconfigwidgets
> 
> 
> Description
> -------
> 
> 3 commits:
> 
> 
> Unittest: make errors readable
> 
> --
> 
> Resurrect KConfigDialog::setHelp (used to come from KDialog).
> 
> It controls the default behavior of showHelp(), which is implemented
> using KHelpClient.
> 
> REVIEW: 115959
> 
> --
> 
> Move KHelpClient down from kxmlgui, for use in KConfigDialog.
> 
> 
> Diffs
> -----
> 
>   autotests/kconfigdialog_unittest.cpp e5322c1782c2a68c15451777066e28a9b7afea23 
>   src/CMakeLists.txt 7da7fba0c15153d6dee381c2b8f282e9837eae36 
>   src/kconfigdialog.h b06efc588c772ed655d581a0e021d92af5e0e280 
>   src/kconfigdialog.cpp 8db48e23f614530cef11a23a182b50d905327405 
>   src/khelpclient.h PRE-CREATION 
>   src/khelpclient.cpp PRE-CREATION 
> 
> Diff: https://git.reviewboard.kde.org/r/115959/diff/
> 
> 
> Testing
> -------
> 
> Compiled all of KF5.
> 
> 
> Thanks,
> 
> David Faure
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20140228/6a6c9172/attachment.html>


More information about the Kde-frameworks-devel mailing list