forked from qt-creator/qt-creator
TextEditor: Return hover handler priority by callback
...to get rid of the asynchronous code path. Change-Id: I56377510440631b0be712333b2a4018717c86389 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#include <coreplugin/helpmanager.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <utils/htmldocextractor.h>
|
||||
#include <utils/executeondestruction.h>
|
||||
|
||||
#include <QTextBlock>
|
||||
#include <QUrl>
|
||||
@@ -44,8 +45,12 @@ ProFileHoverHandler::ProFileHoverHandler()
|
||||
{
|
||||
}
|
||||
|
||||
void ProFileHoverHandler::identifyMatch(TextEditor::TextEditorWidget *editorWidget, int pos)
|
||||
void ProFileHoverHandler::identifyMatch(TextEditor::TextEditorWidget *editorWidget,
|
||||
int pos,
|
||||
ReportPriority report)
|
||||
{
|
||||
Utils::ExecuteOnDestruction reportPriority([this, report](){ report(priority()); });
|
||||
|
||||
m_docFragment.clear();
|
||||
m_manualKind = UnknownManual;
|
||||
if (!editorWidget->extraSelectionTooltip(pos).isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user