Use FileName in TextMark

Change-Id: I3666d95dc8ef3b7da099d6d30f5cb4678a349493
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Eike Ziller
2018-05-02 15:02:00 +02:00
parent 8559df7bc9
commit 45f8d221bf
23 changed files with 84 additions and 65 deletions

View File

@@ -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);

View File

@@ -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)

View File

@@ -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);