--- s10k/CommonLibs/jsonhighlighter/highlighter.h 2017/10/05 17:48:32 1073 +++ s10k/CommonLibs/jsonhighlighter/highlighter.h 2019/02/16 17:24:18 1110 @@ -1,27 +1,28 @@ -#ifndef HIGHLIGHTER_H -#define HIGHLIGHTER_H - -#include -#include - -// Downloaded from here: -// https://github.com/isomoar/json-editor/blob/master/syntaxhighlightening/highlighter.cpp - -class Highlighter: public QSyntaxHighlighter -{ -public: - Highlighter(QTextDocument *parent = 0); -private: - struct HighlightingRule - { - QRegExp pattern; - QTextCharFormat format; - }; - QVector rules; - - -protected: - void highlightBlock(const QString &text); -}; - -#endif // HIGHLIGHTER_H +#ifndef HIGHLIGHTER_H +#define HIGHLIGHTER_H + +#include +#include + +// Downloaded from here: +// https://github.com/isomoar/json-editor/blob/master/syntaxhighlightening/highlighter.cpp + +class Highlighter: public QSyntaxHighlighter +{ + Q_OBJECT +public: + Highlighter(QTextDocument *parent = 0); +protected: + struct HighlightingRule + { + QRegExp pattern; + QTextCharFormat format; + }; + QVector rules; + + +protected: + void highlightBlock(const QString &text); +}; + +#endif // HIGHLIGHTER_H