Commit a411f7b5 authored by Thomas Schöps's avatar Thomas Schöps

ProblemHighlighter: Use qobject_cast for MarkInterface as advised in its documentation

parent 5e17ba4c
Pipeline #2435 failed with stage
in 30 minutes and 54 seconds
......@@ -115,7 +115,7 @@ void ProblemHighlighter::setProblems(const QVector<IProblem::Ptr>& problems)
/// this method...
const uint errorMarkType = KTextEditor::MarkInterface::Error;
const uint warningMarkType = KTextEditor::MarkInterface::Warning;
auto* markIface = dynamic_cast<KTextEditor::MarkInterface*>(m_document.data());
auto* markIface = qobject_cast<KTextEditor::MarkInterface*>(m_document.data());
if (markIface && hadProblems) {
// clear previously added marks
foreach (KTextEditor::Mark* mark, markIface->marks()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment