diff --git a/plugins/problemreporter/problemhighlighter.cpp b/plugins/problemreporter/problemhighlighter.cpp --- a/plugins/problemreporter/problemhighlighter.cpp +++ b/plugins/problemreporter/problemhighlighter.cpp @@ -100,6 +100,17 @@ return; iface->registerTextHintProvider(&m_textHintProvider); + + if (KTextEditor::MarkInterface* markIface = dynamic_cast(m_document.data())) { + // FIXME: hardcoded pixel sizes should not be used here, but the KTextEditor API seems to require it + static QPixmap errorPixmap = QIcon::fromTheme(QStringLiteral("dialog-error")).pixmap(QSize(22, 22)); + static QPixmap warningPixmap = QIcon::fromTheme(QStringLiteral("dialog-warning")).pixmap(QSize(22, 22)); + // TODO: also add icons for information and TODO markers? + // static QPixmap infoPixmap = QIcon::fromTheme(QStringLiteral("dialog-information")).pixmap(QSize(22, 22)); + markIface->setMarkPixmap(KTextEditor::MarkInterface::Warning, warningPixmap); + markIface->setMarkPixmap(KTextEditor::MarkInterface::Error, errorPixmap); + } + } ProblemTextHintProvider::ProblemTextHintProvider(ProblemHighlighter* highlighter)