summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Montel <[email protected]>2018-01-15 22:49:30 +0100
committerLaurent Montel <[email protected]>2018-01-15 22:49:30 +0100
commit09d431ea95b1fafe4cd506321f6d3d68cf195d2b (patch)
treedc58d94b9219505b648883c9711307841fb0e033
parent77f6c3a6e8d3a6ee178f9ab9f73981311bfea12d (diff)
Signal when we can't find definition
-rw-r--r--src/inserthtmleditor.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/inserthtmleditor.cpp b/src/inserthtmleditor.cpp
index c5148f9..dcbb3aa 100644
--- a/src/inserthtmleditor.cpp
+++ b/src/inserthtmleditor.cpp
@@ -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)