summaryrefslogtreecommitdiffstats
path: root/utils/wpseditor/gui/src/qsyntaxer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utils/wpseditor/gui/src/qsyntaxer.cpp')
-rw-r--r--utils/wpseditor/gui/src/qsyntaxer.cpp25
1 files changed, 12 insertions, 13 deletions
diff --git a/utils/wpseditor/gui/src/qsyntaxer.cpp b/utils/wpseditor/gui/src/qsyntaxer.cpp
index fa2608be45..9c4cdd4653 100644
--- a/utils/wpseditor/gui/src/qsyntaxer.cpp
+++ b/utils/wpseditor/gui/src/qsyntaxer.cpp
@@ -6,24 +6,23 @@ QSyntaxer::QSyntaxer(QTextDocument *parent)
: QSyntaxHighlighter(parent) {
HighlightingRule rule;
- hrules["operator"].pattern = QRegExp("%[^\\| \n<\\?%]{1,2}");
- hrules["operator"].format.setFontWeight(QFont::Bold);
- hrules["operator"].format.setForeground(Qt::darkBlue);
+ hrules[0].pattern = QRegExp("%[^\\| \n<\\?%]{1,2}");
+ hrules[0].format.setFontWeight(QFont::Bold);
+ hrules[0].format.setForeground(Qt::darkBlue);
- hrules["question"].pattern = QRegExp("%[\\?]{1}[^<]{1,2}");
- hrules["question"].format.setForeground(Qt::darkMagenta);
-
- hrules["question2"].pattern = QRegExp("(<|>)");
- hrules["question2"].format.setForeground(Qt::red);
+ hrules[1].pattern = QRegExp("%[\\?]{1}[^<]{1,2}");
+ hrules[1].format.setForeground(Qt::darkMagenta);
+ hrules[2].pattern = QRegExp("(<|>)");
+ hrules[2].format.setForeground(Qt::red);
- hrules["limiter"].pattern = QRegExp("\\|");
- hrules["limiter"].format.setForeground(Qt::darkRed);
+ hrules[3].pattern = QRegExp("\\|");
+ hrules[3].format.setForeground(Qt::darkRed);
- hrules["comment"].pattern = QRegExp("#[^\n]*");
- hrules["comment"].format.setForeground(Qt::darkGreen);
- hrules["comment"].format.setFontItalic(true);
+ hrules[4].pattern = QRegExp("#[^\n]*");
+ hrules[4].format.setForeground(Qt::darkGreen);
+ hrules[4].format.setFontItalic(true);
}
//
void QSyntaxer::highlightBlock(const QString &text) {