diff options
author | Nikolai Kosjar <nikolai.kosjar@qt.io> | 2018-01-18 10:47:45 +0100 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@qt.io> | 2018-01-19 13:57:57 +0000 |
commit | 0a4073ef90cb61400856ead7c137064096694b6a (patch) | |
tree | db37a4246ce5365b9c7d04f9b5474728585b3064 /src/plugins/clangrefactoring | |
parent | 2d7f1d6c8cf5c9be01d12bd71dbf05da6ce7c3d6 (diff) | |
download | qt-creator-0a4073ef90cb61400856ead7c137064096694b6a.tar.gz |
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>
Diffstat (limited to 'src/plugins/clangrefactoring')
-rw-r--r-- | src/plugins/clangrefactoring/clangqueryhoverhandler.cpp | 7 | ||||
-rw-r--r-- | src/plugins/clangrefactoring/clangqueryhoverhandler.h | 4 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/plugins/clangrefactoring/clangqueryhoverhandler.cpp b/src/plugins/clangrefactoring/clangqueryhoverhandler.cpp index e8ce90c297..11a29f1db1 100644 --- a/src/plugins/clangrefactoring/clangqueryhoverhandler.cpp +++ b/src/plugins/clangrefactoring/clangqueryhoverhandler.cpp @@ -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; diff --git a/src/plugins/clangrefactoring/clangqueryhoverhandler.h b/src/plugins/clangrefactoring/clangqueryhoverhandler.h index 7a93bcbf5d..a9dfc5fe22 100644 --- a/src/plugins/clangrefactoring/clangqueryhoverhandler.h +++ b/src/plugins/clangrefactoring/clangqueryhoverhandler.h @@ -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; |