Members of the KDE Community are recommended to subscribe to the kde-community mailing list at to allow them to participate in important discussions and receive other important announcements

Commit 09d431ea authored by Laurent Montel's avatar Laurent Montel 😁

Signal when we can't find definition

parent 77f6c3a6
......@@ -20,6 +20,7 @@
#include "inserthtmleditor.h"
#include "texteditorcompleter.h"
#include "kpimtextedit_debug.h"
#include <KSyntaxHighlighting/SyntaxHighlighter>
#include <KSyntaxHighlighting/Definition>
......@@ -36,6 +37,9 @@ InsertHtmlEditor::InsertHtmlEditor(QWidget *parent)
KSyntaxHighlighting::Definition def;
def = mRepo.definitionForName(QStringLiteral("HTML"));
if (!def.isValid()) {
qCWarning(KPIMTEXTEDIT_LOG) << "Invalid definition name";
KSyntaxHighlighting::SyntaxHighlighter *hl = new KSyntaxHighlighting::SyntaxHighlighter(document());
hl->setTheme((palette().color(QPalette::Base).lightness() < 128)
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