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 <dynamicastmatcherdiagnosticmessagecontainer.h>
|
||||
|
||||
#include <texteditor/texteditor.h>
|
||||
#include <utils/executeondestruction.h>
|
||||
|
||||
namespace ClangRefactoring {
|
||||
|
||||
@@ -38,8 +39,12 @@ ClangQueryHoverHandler::ClangQueryHoverHandler(ClangQueryHighlighter *highligher
|
||||
{
|
||||
}
|
||||
|
||||
void ClangQueryHoverHandler::identifyMatch(TextEditor::TextEditorWidget *editorWidget, int position)
|
||||
void ClangQueryHoverHandler::identifyMatch(TextEditor::TextEditorWidget *editorWidget,
|
||||
int position,
|
||||
ReportPriority report)
|
||||
{
|
||||
Utils::ExecuteOnDestruction reportPriority([this, report](){ report(priority()); });
|
||||
|
||||
using Messages = ClangBackEnd::DynamicASTMatcherDiagnosticMessageContainers;
|
||||
using Contexts = ClangBackEnd::DynamicASTMatcherDiagnosticContextContainers;
|
||||
|
||||
|
||||
@@ -37,7 +37,9 @@ public:
|
||||
ClangQueryHoverHandler(ClangQueryHighlighter *highligher);
|
||||
|
||||
protected:
|
||||
void identifyMatch(TextEditor::TextEditorWidget *editorWidget, int position) override;
|
||||
void identifyMatch(TextEditor::TextEditorWidget *editorWidget,
|
||||
int position,
|
||||
ReportPriority report) override;
|
||||
|
||||
private:
|
||||
ClangQueryHighlighter *m_highligher;
|
||||
|
||||
Reference in New Issue
Block a user