Clang: Fix minor style issues

Change-Id: I040e3f6fcd717b4ffae2f0ded8bfebada67888fb
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Orgad Shaneh
2018-04-12 00:13:48 +03:00
committed by Orgad Shaneh
parent fb8f007bbb
commit 070b5fdbbb
2 changed files with 4 additions and 4 deletions

View File

@@ -338,7 +338,7 @@ bool ClangDiagnosticManager::hasDiagnosticsAt(uint line, uint column) const
QTextDocument *textDocument = m_textDocument->document();
return editorDocumentProcessorHasDiagnosticAt(m_errorDiagnostics, line, column, textDocument)
|| editorDocumentProcessorHasDiagnosticAt(m_warningDiagnostics, line, column, textDocument);
|| editorDocumentProcessorHasDiagnosticAt(m_warningDiagnostics, line, column, textDocument);
}
QVector<ClangBackEnd::DiagnosticContainer>
@@ -417,7 +417,7 @@ void ClangDiagnosticManager::addClangTextMarks(
const auto it = std::remove(m_clangTextMarks.begin(), m_clangTextMarks.end(), mark);
m_clangTextMarks.erase(it, m_clangTextMarks.end());
delete mark;
};
};
auto textMark = new ClangTextMark(filePath(), diagnostic, onMarkRemoved,
m_showTextMarkAnnotations);
m_clangTextMarks.push_back(textMark);

View File

@@ -54,7 +54,7 @@ bool isWarningOrNote(ClangBackEnd::DiagnosticSeverity severity)
Q_UNREACHABLE();
}
Core::Id cartegoryForSeverity(ClangBackEnd::DiagnosticSeverity severity)
static Core::Id categoryForSeverity(ClangBackEnd::DiagnosticSeverity severity)
{
return isWarningOrNote(severity) ? Constants::CLANG_WARNING : Constants::CLANG_ERROR;
}
@@ -68,7 +68,7 @@ ClangTextMark::ClangTextMark(const QString &fileName,
bool showLineAnnotations)
: TextEditor::TextMark(fileName,
int(diagnostic.location.line),
cartegoryForSeverity(diagnostic.severity))
categoryForSeverity(diagnostic.severity))
, m_diagnostic(diagnostic)
, m_removedFromEditorHandler(removedHandler)
{