Bug 383875 - After unchecking plugin CMake Documentation disappears view with Qt Documentation
Summary: After unchecking plugin CMake Documentation disappears view with Qt Documenta...
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Documentation viewer (show other bugs)
Version: 5.1.2
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-22 20:29 UTC by Piotr Mierzwinski
Modified: 2017-10-11 21:52 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.2.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Mierzwinski 2017-08-22 20:29:13 UTC
Usually I have checked two plugins documentations: CMake and Qt.
When I uncheck plugin "CMake Documentation" (apply settings), then after restart of KDevelop I can't see the view of "Documentation", where should be present Qt Documentation only.
To restore documentation view I need to check "CMake Documentation" plugin again and restart KDevelop.
Comment 1 Piotr Mierzwinski 2017-10-03 20:42:24 UTC
The same result in version 5.1.80
Tested on ./KDevelop-5.1.80-x86_64.AppImage
Comment 2 Friedrich W. H. Kossebau 2017-10-03 21:00:41 UTC
Can confirm also for master that, if any plugins implementing org.kdevelop.IDocumentationProvider are disabled, the documentation toolview disappears.
The Qt docs plugin (kdevqthelp) implements the org.kdevelop.IDocumentationProviderProvider (sic, ProviderProvider) instead. So possibly the code testing for enabled documentation plugins misses to check such plugins as well.
Comment 3 Friedrich W. H. Kossebau 2017-10-04 17:33:37 UTC
Git commit 781bb47c95fabd7e28eb2c6966deb8daeb557fb5 by Friedrich W. H. Kossebau.
Committed on 04/10/2017 at 17:33.
Pushed by kossebau into branch '5.2'.

Always create Documentation tool view, fix it to work with no providers

Summary:
Creating the Documentation tool view at DocumentationController
initialization time only if the list returned by documentationProviders() is
non-empty has some flaws:
1) The QtHelp plugin delays initialization to after reaching the event loop.
So if it is the only documentation provider (provider) plugin activated, it
will return 0 providers in the beginning.
2) It ignores the option that users can enable another documentation provider plugin
at runtime.
3) There is also no code for removing the tool view in case the user
disables any documentation providers at runtime.
4) It ignores the option of plugins like the QtHelp one allowing the user to
disable any documentation providers at runtime.

This patch always creates the toolview instead of magically creating/removing it
automatically based on documentation provider availability and leaves it to
the user to add or remove it as they prefer.

It also prepares the Documentation tool view to properly handle the case of
no documentation providers available (done in a way to keep the current public
API).
FIXED-IN: 5.2.0

Reviewers: #kdevelop, apol

Reviewed By: #kdevelop, apol

Subscribers: kdevelop-devel

Differential Revision: https://phabricator.kde.org/D8140

M  +30   -9    kdevplatform/documentation/documentationview.cpp
M  +1    -1    kdevplatform/shell/documentationcontroller.cpp

https://commits.kde.org/kdevelop/781bb47c95fabd7e28eb2c6966deb8daeb557fb5
Comment 4 RJVB 2017-10-05 08:20:45 UTC
Strange, my experience is that I can use the Qt documentation view without any of the other documentation providers enabled. And I always disabled the others because they turned the documentation view into a bit of a poltergeist - I hope this commit will extend that behaviour to the Qt documentation plugin!
Comment 5 Piotr Mierzwinski 2017-10-11 21:52:35 UTC
I confirm. After this fix "Documentation" view (only with Qt) works fine for me.
Thanks.