forked from qt-creator/qt-creator
some tuning of the layer extra selections
Remove overlap. Add extra selection tooltips for the cpp hover handler.
This commit is contained in:
@@ -272,8 +272,10 @@ void CppHoverHandler::updateHelpIdAndTooltip(TextEditor::ITextEditor *editor, in
|
||||
if (!doc)
|
||||
return; // nothing to do
|
||||
|
||||
QString formatTooltip = edit->extraSelectionTooltip(pos);
|
||||
QTextCursor tc(edit->document());
|
||||
tc.setPosition(pos);
|
||||
|
||||
const unsigned lineNumber = tc.block().blockNumber() + 1;
|
||||
|
||||
// Find the last symbol up to the cursor position
|
||||
@@ -392,6 +394,11 @@ void CppHoverHandler::updateHelpIdAndTooltip(TextEditor::ITextEditor *editor, in
|
||||
m_helpEngineNeedsSetup = false;
|
||||
}
|
||||
|
||||
|
||||
if (!formatTooltip.isEmpty()) {
|
||||
m_toolTip = formatTooltip;
|
||||
}
|
||||
|
||||
if (!m_toolTip.isEmpty())
|
||||
m_toolTip = Qt::escape(m_toolTip);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user