Context browser: fix handleRect for non-symbol tooltips
The ContextBrowserPlugin::showToolTip() tried to calculate the handle
rect for the tooltip in all cases from DUChainUtils::itemUnderCursor(),
which currently in case of no symbol repots a valid empty range at
This results in bogus active zones for the tooltips for problem tooltips,
but also languages where the language support plugin has many items not
in the DUChain (like the CMake support plugin).
This patches fixes this by
a) changing ILanguageSupport::specialLanguageObjectNavigationWidget()
to report not only the widget but also which document range the object
covers for which the widget was created.
b) collect the ranges from all places from which the tooltip widget is
Tooltips for problems and cmake symbols behave now similar to those for e.g.
C++ symbols. E.g.. tooltips for items at the bottom of the screen, where the
tooltip is shown above, the tooltip now can be entered by the mouse and does
not disappear on a move.
C++ language tooltips work as before.
Reviewers: KDevelop, kfunk
Reviewed By: KDevelop, kfunk
Subscribers: kfunk, brauch, kdevelop-devel
Differential Revision: https://phabricator.kde.org/D16203