Ignore:
Timestamp:
Feb 16, 2019, 6:24:18 PM (6 years ago)
Author:
s10k
Message:

slightly modifications to allow subclassing, added Q_OBJECT macro, since usually all classes derived from QObject should use it

Location:
s10k/CommonLibs/jsonhighlighter
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • s10k/CommonLibs/jsonhighlighter/highlighter.cpp

    r1096 r1110  
    3232void Highlighter::highlightBlock(const QString &text)
    3333{
    34     for (const HighlightingRule &rule : rules) {
     34    foreach (const HighlightingRule &rule, rules) {
    3535        QRegExp expression(rule.pattern);
    3636        int index = expression.indexIn(text);
  • s10k/CommonLibs/jsonhighlighter/highlighter.h

    r1073 r1110  
    1010class Highlighter: public QSyntaxHighlighter
    1111{
     12        Q_OBJECT
    1213public:
    1314     Highlighter(QTextDocument *parent = 0);
    14 private:
     15protected:
    1516     struct HighlightingRule
    1617     {
Note: See TracChangeset for help on using the changeset viewer.