forked from qt-creator/qt-creator
Clang: Tool tips for clang query diagnostics
If you hover a diagnostics in for a clang query you get now a simple tool tip. Change-Id: I6352dd3d4b9a33c183e69037eac903469b90eea4 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user