aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/clangrefactoring/clangquerytexteditorwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/clangrefactoring/clangquerytexteditorwidget.cpp')
-rw-r--r--src/plugins/clangrefactoring/clangquerytexteditorwidget.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/plugins/clangrefactoring/clangquerytexteditorwidget.cpp b/src/plugins/clangrefactoring/clangquerytexteditorwidget.cpp
index 7ca9d902545..2d0552680c9 100644
--- a/src/plugins/clangrefactoring/clangquerytexteditorwidget.cpp
+++ b/src/plugins/clangrefactoring/clangquerytexteditorwidget.cpp
@@ -26,19 +26,24 @@
#include "clangquerytexteditorwidget.h"
#include "clangqueryhighlighter.h"
+#include "clangqueryhoverhandler.h"
#include <texteditor/textdocument.h>
namespace ClangRefactoring {
ClangQueryTextEditorWidget::ClangQueryTextEditorWidget(QWidget *parent)
- : BaseClangQueryTextEditorWidget(parent)
+ : BaseClangQueryTextEditorWidget(parent),
+ m_syntaxHighlighter(new ClangQueryHighlighter),
+ m_hoverHandler(std::make_unique<ClangQueryHoverHandler>(m_syntaxHighlighter))
{
- m_syntaxHighlighter = new ClangQueryHighlighter;
-
textDocument()->setSyntaxHighlighter(m_syntaxHighlighter);
+
+ addHoverHandler(m_hoverHandler.get());
}
+ClangQueryTextEditorWidget::~ClangQueryTextEditorWidget() = default;
+
ClangQueryHighlighter *ClangQueryTextEditorWidget::syntaxHighlighter() const
{
return m_syntaxHighlighter;