forked from qt-creator/qt-creator
TextEditor: Implement BaseHoverHandler::identifyMatch()
The extra selection tooltips are a good default for a hover match. We use that in the basic plaintext editor to show, for example, syntax errors in XML documents, detected during extra compiler runs. Change-Id: Ib7f755c482ebc04148567105e4779324799fb670 Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This commit is contained in:
@@ -143,6 +143,13 @@ void BaseHoverHandler::process(TextEditorWidget *widget, int pos)
|
||||
decorateToolTip();
|
||||
}
|
||||
|
||||
void BaseHoverHandler::identifyMatch(TextEditorWidget *editorWidget, int pos)
|
||||
{
|
||||
QString tooltip = editorWidget->extraSelectionTooltip(pos);
|
||||
if (!tooltip.isEmpty())
|
||||
setToolTip(tooltip);
|
||||
}
|
||||
|
||||
void BaseHoverHandler::decorateToolTip()
|
||||
{
|
||||
if (Qt::mightBeRichText(toolTip()))
|
||||
|
||||
Reference in New Issue
Block a user