File tree Expand file tree Collapse file tree 2 files changed +0
-7
lines changed
Expand file tree Collapse file tree 2 files changed +0
-7
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ void JsonHighlighter::initKeyWordsRules()
1313 mStringPattern = R"( "[A-Za-z0-9_]*"|(?<=:)\s*".*")" ;
1414 mBoolPattern = R"( \b(true|false)\b)" ;
1515 mNumberPattern = R"( \b\d+\b)" ;
16- mCommentPattern = R"( //.*)" ;
1716
1817 // init all the format
1918 mStringFormat .setForeground (QColor (0 , 200 , 0 )); // green
@@ -25,14 +24,10 @@ void JsonHighlighter::initKeyWordsRules()
2524 mNumberFormat .setForeground (QColor (0 , 0 , 200 )); // blue
2625 mNumberFormat .setBackground (QColor (255 , 255 , 255 ));
2726
28- mCommentFormat .setForeground (QColor (150 , 150 , 150 )); // gray
29- mCommentFormat .setBackground (QColor (255 , 255 , 255 ));
30-
3127 // gather all the rules
3228 mKeyWordsRules .append (Rule (mStringPattern , mStringFormat ));
3329 mKeyWordsRules .append (Rule (mBoolPattern , mBoolFormat ));
3430 mKeyWordsRules .append (Rule (mNumberPattern , mNumberFormat ));
35- mKeyWordsRules .append (Rule (mCommentPattern , mCommentFormat ));
3631}
3732
3833void JsonHighlighter::initSpecialRules ()
Original file line number Diff line number Diff line change @@ -51,12 +51,10 @@ class JsonHighlighter : public QSyntaxHighlighter
5151 QString mStringPattern ;
5252 QString mBoolPattern ;
5353 QString mNumberPattern ;
54- QString mCommentPattern ;
5554
5655 QTextCharFormat mStringFormat ;
5756 QTextCharFormat mBoolFormat ;
5857 QTextCharFormat mNumberFormat ;
59- QTextCharFormat mCommentFormat ;
6058
6159 // special rules:
6260 QRegularExpression mColorPattern ;
You can’t perform that action at this time.
0 commit comments