forked from qt-creator/qt-creator
Use FileName in TextMark
Change-Id: I3666d95dc8ef3b7da099d6d30f5cb4678a349493 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -475,7 +475,9 @@ void ClangDiagnosticManager::addClangTextMarks(
|
||||
m_clangTextMarks.erase(it, m_clangTextMarks.end());
|
||||
delete mark;
|
||||
};
|
||||
auto textMark = new ClangTextMark(filePath(), diagnostic, onMarkRemoved,
|
||||
auto textMark = new ClangTextMark(::Utils::FileName::fromString(filePath()),
|
||||
diagnostic,
|
||||
onMarkRemoved,
|
||||
m_showTextMarkAnnotations);
|
||||
m_clangTextMarks.push_back(textMark);
|
||||
m_textDocument->addMark(textMark);
|
||||
|
||||
@@ -36,6 +36,8 @@
|
||||
#include <QLayout>
|
||||
#include <QString>
|
||||
|
||||
using namespace Utils;
|
||||
|
||||
namespace ClangCodeModel {
|
||||
|
||||
namespace {
|
||||
@@ -62,7 +64,7 @@ static Core::Id categoryForSeverity(ClangBackEnd::DiagnosticSeverity severity)
|
||||
} // anonymous namespace
|
||||
|
||||
|
||||
ClangTextMark::ClangTextMark(const QString &fileName,
|
||||
ClangTextMark::ClangTextMark(const FileName &fileName,
|
||||
const ClangBackEnd::DiagnosticContainer &diagnostic,
|
||||
const RemovedFromEditorHandler &removedHandler,
|
||||
bool showLineAnnotations)
|
||||
|
||||
@@ -39,7 +39,7 @@ class ClangTextMark : public TextEditor::TextMark
|
||||
public:
|
||||
using RemovedFromEditorHandler = std::function<void(ClangTextMark *)>;
|
||||
|
||||
ClangTextMark(const QString &fileName,
|
||||
ClangTextMark(const ::Utils::FileName &fileName,
|
||||
const ClangBackEnd::DiagnosticContainer &diagnostic,
|
||||
const RemovedFromEditorHandler &removedHandler,
|
||||
bool showLineAnnotations);
|
||||
|
||||
Reference in New Issue
Block a user