D16203: Context browser: fix handleRect for non-symbol tooltips

Friedrich W. H. Kossebau noreply at phabricator.kde.org
Sun Oct 14 18:34:47 BST 2018


kossebau created this revision.
kossebau added a reviewer: KDevelop.
Herald added a project: KDevelop.
Herald added a subscriber: kdevelop-devel.
kossebau requested review of this revision.

REVISION SUMMARY
  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
  position 0,0.
  
  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
  fetched

TEST PLAN
  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.

REPOSITORY
  R32 KDevelop

BRANCH
  fixhandlerectfornavigationWidgettooltip

REVISION DETAIL
  https://phabricator.kde.org/D16203

AFFECTED FILES
  kdevplatform/language/interfaces/ilanguagesupport.cpp
  kdevplatform/language/interfaces/ilanguagesupport.h
  plugins/clang/clangsupport.cpp
  plugins/clang/clangsupport.h
  plugins/cmake/cmakemanager.cpp
  plugins/cmake/cmakemanager.h
  plugins/contextbrowser/contextbrowser.cpp
  plugins/contextbrowser/contextbrowser.h
  plugins/qmljs/kdevqmljsplugin.cpp
  plugins/qmljs/kdevqmljsplugin.h
  plugins/quickopen/quickopenplugin.cpp

To: kossebau, #kdevelop
Cc: kdevelop-devel, glebaccon, antismap, iodelay, vbspam, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20181014/1969c45f/attachment.html>


More information about the KDevelop-devel mailing list