summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2015-07-27 07:43:18 +0200
committerMontel Laurent <[email protected]>2015-07-27 07:43:18 +0200
commitc52a1887f00c26adf86dbef0a957bbe507daa369 (patch)
tree3d83436521ac4ec79ad1bd868be04019dcb59d4c
parent46cf66dea5eb5971345c627cd57ad09ac7a4b9cd (diff)
Add syntaxhighlighter rules for debug keyword
-rw-r--r--pimcommon/sievehighlighter/sievesyntaxhighlighterrules.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/pimcommon/sievehighlighter/sievesyntaxhighlighterrules.cpp b/pimcommon/sievehighlighter/sievesyntaxhighlighterrules.cpp
index 6ab714e..e0dce6e 100644
--- a/pimcommon/sievehighlighter/sievesyntaxhighlighterrules.cpp
+++ b/pimcommon/sievehighlighter/sievesyntaxhighlighterrules.cpp
@@ -82,6 +82,18 @@ void SieveSyntaxHighlighterRules::init()
m_rules.append(KPIMTextEdit::Rule(regex, textKeywordFormat));
}
+ // Special debug info
+ QTextCharFormat debugFormat;
+ debugFormat.setForeground(Qt::red);
+ debugFormat.setFontWeight(QFont::Bold);
+ debugFormat.setFontItalic(true);
+ textKeywords << QStringLiteral("\\bdebug_log");
+ Q_FOREACH (const QString &s, textKeywords) {
+ const QRegExp regex(s, Qt::CaseSensitive);
+ m_rules.append(KPIMTextEdit::Rule(regex, debugFormat));
+ }
+
+
// Match Type
QTextCharFormat matchFormat;
matchFormat.setForeground(Qt::red);