ClangCodeModel: Prevent outdated fix-its from getting applied

The code locations might no longer be correct.

Fixes: QTCREATORBUG-21818
Change-Id: I866a29d2fd63ff65cf33168024f7788c5f6e3547
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2020-11-20 17:26:26 +01:00
parent 0d12c8cba8
commit bcf900e29b
6 changed files with 37 additions and 19 deletions

View File

@@ -34,6 +34,7 @@
namespace ClangCodeModel {
namespace Internal {
class ClangDiagnosticManager;
class ClangTextMark : public TextEditor::TextMark
{
@@ -43,7 +44,8 @@ public:
ClangTextMark(const ::Utils::FilePath &fileName,
const ClangBackEnd::DiagnosticContainer &diagnostic,
const RemovedFromEditorHandler &removedHandler,
bool fullVisualization);
bool fullVisualization,
const ClangDiagnosticManager *diagMgr);
ClangBackEnd::DiagnosticContainer diagnostic() const { return m_diagnostic; }
void updateIcon(bool valid = true);
@@ -55,6 +57,7 @@ private:
private:
ClangBackEnd::DiagnosticContainer m_diagnostic;
RemovedFromEditorHandler m_removedFromEditorHandler;
const ClangDiagnosticManager * const m_diagMgr;
};
} // namespace Internal