Add GUI feedback if no system QtHelp file is available
ClosedPublic

Authored by cordlandwehr on May 7 2016, 4:43 PM.

Details

Summary

If the QtHelp documentation is not working for a user, regardless of the
checked option in the configuration dialog, it is not clear where to search
for the problem. Specifically, the typical problem is a not installed distro
Qt documentation package. This patch adds information where to start searching
for the solution by hinting the user to look at the path provided by "qmake -query".

Diff Detail

Repository
R32 KDevelop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
cordlandwehr updated this revision to Diff 3688.May 7 2016, 4:43 PM
cordlandwehr retitled this revision from to Add GUI feedback if no system QtHelp file is available.
cordlandwehr updated this object.
cordlandwehr edited the test plan for this revision. (Show Details)
cordlandwehr added a reviewer: KDevelop.
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptMay 7 2016, 4:43 PM

Screenshot for situation when no QtHelp is found:

kfunk requested changes to this revision.May 9 2016, 6:39 AM
kfunk added a reviewer: kfunk.
kfunk added a subscriber: kfunk.

I like the idea, but please make use of KMessageWidget.

This revision now requires changes to proceed.May 9 2016, 6:39 AM
cordlandwehr updated this revision to Diff 3731.May 9 2016, 5:39 PM
cordlandwehr edited edge metadata.

Use message widget for status message.

Updated screenshot:

apol added a subscriber: apol.May 9 2016, 11:27 PM
apol added inline comments.
documentation/qthelp/qthelpconfig.cpp
380

Why the change? This doesn't specify what kind of documentation. One could have documentation on other formats. e.g. PHP docs

documentation/qthelp/qthelpqtdoc.cpp
120 ↗(On Diff #3731)

This loop looks weird. It will just take the first entry, is that what we want?

cordlandwehr added inline comments.May 10 2016, 7:16 PM
documentation/qthelp/qthelpconfig.cpp
380

My intention was to make clear that this is a configuration page for the API documentations one can install for different frameworks/languages. "QtHelp Documentation" is correct from the implementation details, yet a user won't care if it is in QCH files or different containers. Furthermore, I did not use "Documentation" since that easily can be confused with documentation about KDevelop.
Actually, IMO PHP Docs is API documentation and fits will under this caption.
Which caption would you prefer?

documentation/qthelp/qthelpqtdoc.cpp
120 ↗(On Diff #3731)

I see your point. The logic however was already there and worked :)
I will have a look *why* it works this way and add a comment explaining this.

cordlandwehr edited edge metadata.

Fix handling of all QCH files instead of only first.

All QCH files must be processed instead of only the first one.
This problem was covered by the internal caching of the help files
and showed only in a clean environment.

apol accepted this revision.May 11 2016, 12:55 AM
apol added a reviewer: apol.

Looks good to me all in all. Maybe a unit test could be introduced. That would be very welcome.

For now, let's get this in (modulo the nitpicks).

documentation/qthelp/qthelpconfig.cpp
380

Maybe "Qt API Documentation"?

documentation/qthelp/qthelpplugin.cpp
165 ↗(On Diff #3755)

name isQtHelpAvailable (bool property naming convention).

documentation/qthelp/qthelpqtdoc.cpp
124 ↗(On Diff #3755)

Use entryInfoList so you don't need to explicitly construct the path.

This revision was automatically updated to reflect the committed changes.