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

Authored by kossebau on Oct 4 2017, 2:17 PM.

Details

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.

  1. It ignores the option that users can enable another documentation provider plugin

at runtime.

  1. There is also no code for removing the tool view in case the user

disables any documentation providers at runtime.

  1. 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).

BUG: 383875
FIXED-IN: 5.2.0

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.
kossebau created this revision.Oct 4 2017, 2:17 PM
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptOct 4 2017, 2:18 PM

Target is 5.2 (that's why I stayed with the public API of DocumentationView instead of redoing the class logic).

apol accepted this revision.Oct 4 2017, 2:59 PM
This revision is now accepted and ready to land.Oct 4 2017, 2:59 PM
kossebau edited the summary of this revision. (Show Details)Oct 4 2017, 5:11 PM
This revision was automatically updated to reflect the committed changes.