forked from qt-creator/qt-creator
TextEditor: Add line annotations
Displaying short descriptive text of a TextMark at line end. Currently implemented for ClangTextMark and BookMark. Change-Id: Idc6b579bda0382ad94b2e236b715696396b10460 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -79,6 +79,7 @@ ClangTextMark::ClangTextMark(const QString &fileName,
|
||||
setPriority(warning ? TextEditor::TextMark::NormalPriority
|
||||
: TextEditor::TextMark::HighPriority);
|
||||
setIcon(diagnostic.severity());
|
||||
setLineAnnotation(diagnostic.text().toString());
|
||||
}
|
||||
|
||||
void ClangTextMark::setIcon(ClangBackEnd::DiagnosticSeverity severity)
|
||||
@@ -96,7 +97,7 @@ void ClangTextMark::setIcon(ClangBackEnd::DiagnosticSeverity severity)
|
||||
TextMark::setIcon(errorIcon);
|
||||
}
|
||||
|
||||
bool ClangTextMark::addToolTipContent(QLayout *target)
|
||||
bool ClangTextMark::addToolTipContent(QLayout *target) const
|
||||
{
|
||||
using Internal::ClangDiagnosticWidget;
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ public:
|
||||
|
||||
private:
|
||||
void setIcon(ClangBackEnd::DiagnosticSeverity severity);
|
||||
bool addToolTipContent(QLayout *target) override;
|
||||
bool addToolTipContent(QLayout *target) const override;
|
||||
void removedFromEditor() override;
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user