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:
@@ -45,6 +45,7 @@
|
||||
#include <qmljs/qmljsqrcparser.h>
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <texteditor/helpitem.h>
|
||||
#include <utils/executeondestruction.h>
|
||||
#include <utils/tooltip/tooltip.h>
|
||||
|
||||
#include <QDir>
|
||||
@@ -201,8 +202,10 @@ bool QmlJSHoverHandler::setQmlTypeHelp(const ScopeChain &scopeChain, const Docum
|
||||
return true;
|
||||
}
|
||||
|
||||
void QmlJSHoverHandler::identifyMatch(TextEditorWidget *editorWidget, int pos)
|
||||
void QmlJSHoverHandler::identifyMatch(TextEditorWidget *editorWidget, int pos, ReportPriority report)
|
||||
{
|
||||
Utils::ExecuteOnDestruction reportPriority([this, report](){ report(priority()); });
|
||||
|
||||
reset();
|
||||
|
||||
if (!m_modelManager)
|
||||
|
||||
@@ -58,7 +58,9 @@ public:
|
||||
private:
|
||||
void reset();
|
||||
|
||||
void identifyMatch(TextEditor::TextEditorWidget *editorWidget, int pos) override;
|
||||
void identifyMatch(TextEditor::TextEditorWidget *editorWidget,
|
||||
int pos,
|
||||
ReportPriority report) override;
|
||||
void operateTooltip(TextEditor::TextEditorWidget *editorWidget, const QPoint &point) override;
|
||||
|
||||
bool matchDiagnosticMessage(QmlJSEditorWidget *qmlEditor, int pos);
|
||||
|
||||
Reference in New Issue
Block a user