Clang: Fix removing text marks on line deletion

Task-number: QTCREATORBUG-17270
Change-Id: I582015597a65141e420622dcdb50e82f9791b189
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Nikolai Kosjar
2016-11-17 15:55:06 +01:00
parent c4d9f6ac3f
commit 4a08f14cf6
3 changed files with 33 additions and 6 deletions

View File

@@ -30,18 +30,28 @@
#include <texteditor/textmark.h>
#include <functional>
namespace ClangCodeModel {
class ClangTextMark : public TextEditor::TextMark
{
public:
ClangTextMark(const QString &fileName, const ClangBackEnd::DiagnosticContainer &diagnostic);
using RemovedFromEditorHandler = std::function<void(ClangTextMark *)>;
ClangTextMark(const QString &fileName,
const ClangBackEnd::DiagnosticContainer &diagnostic,
const RemovedFromEditorHandler &removedHandler);
private:
bool addToolTipContent(QLayout *target);
void setIcon(ClangBackEnd::DiagnosticSeverity severity);
bool addToolTipContent(QLayout *target) override;
void removedFromEditor() override;
private:
ClangBackEnd::DiagnosticContainer m_diagnostic;
RemovedFromEditorHandler m_removedFromEditorHandler;
};
} // namespace ClangCodeModel