<table><tr><td style="">kossebau created this revision.<br />kossebau added a reviewer: KDevelop.<br />Herald added a project: KDevelop.<br />Herald added a subscriber: kdevelop-devel.<br />kossebau requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D16203">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>The ContextBrowserPlugin::showToolTip() tried to calculate the handle<br />
rect for the tooltip in all cases from DUChainUtils::itemUnderCursor(),<br />
which currently in case of no symbol repots a valid empty range at<br />
position 0,0.</p>

<p>This results in bogus active zones for the tooltips for problem tooltips,<br />
but also languages where the language support plugin has many items not<br />
in the DUChain (like the CMake support plugin).</p>

<p>This patches fixes this by<br />
a) changing ILanguageSupport::specialLanguageObjectNavigationWidget()<br />
to report not only the widget but also which document range the object<br />
covers for which the widget was created.<br />
b) collect the ranges from all places from which the tooltip widget is<br />
fetched</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Tooltips for problems and cmake symbols behave now similar to those for e.g.<br />
C++ symbols. E.g.. tooltips for items at the bottom of the screen, where the<br />
tooltip is shown above, the tooltip now can be entered by the mouse and does<br />
not disappear on a move.<br />
C++ language tooltips work as before.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R32 KDevelop</div></div></div><br /><div><strong>BRANCH</strong><div><div>fixhandlerectfornavigationWidgettooltip</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D16203">https://phabricator.kde.org/D16203</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>kdevplatform/language/interfaces/ilanguagesupport.cpp<br />
kdevplatform/language/interfaces/ilanguagesupport.h<br />
plugins/clang/clangsupport.cpp<br />
plugins/clang/clangsupport.h<br />
plugins/cmake/cmakemanager.cpp<br />
plugins/cmake/cmakemanager.h<br />
plugins/contextbrowser/contextbrowser.cpp<br />
plugins/contextbrowser/contextbrowser.h<br />
plugins/qmljs/kdevqmljsplugin.cpp<br />
plugins/qmljs/kdevqmljsplugin.h<br />
plugins/quickopen/quickopenplugin.cpp</div></div></div><br /><div><strong>To: </strong>kossebau, KDevelop<br /><strong>Cc: </strong>kdevelop-devel, glebaccon, antismap, iodelay, vbspam, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd<br /></div>