diff --git a/tests/auto/generichighlighter/highlighterengine/syntaxhighlighter.h b/tests/auto/generichighlighter/highlighterengine/syntaxhighlighter.h index c1355d8ce37596af48adf67c99819a90adf988d2..d8ce7728705729c45d44903d6dc7543ca3a4d63c 100644 --- a/tests/auto/generichighlighter/highlighterengine/syntaxhighlighter.h +++ b/tests/auto/generichighlighter/highlighterengine/syntaxhighlighter.h @@ -31,13 +31,24 @@ #define SYNTAXHIGHLIGHTER_H // Replaces the "real" syntaxhighlighter.h file. The scope of this test is restricted to the -// highlight definition's context engine. Using QSyntaxHighlighter as a base instead of the -// real TextEditor::SyntaxHighlighter should not affect it. +// highlight definition's context engine. Using a mock derived from QSyntaxHighlighter as a +// base instead of the real TextEditor::SyntaxHighlighter should not affect it. #include <QtGui/QSyntaxHighlighter> namespace TextEditor { - typedef QSyntaxHighlighter SyntaxHighlighter; + +class SyntaxHighlighter : public QSyntaxHighlighter +{ +public: + SyntaxHighlighter(QTextDocument *parent) : QSyntaxHighlighter(parent) {} + virtual ~SyntaxHighlighter() {} + +protected: + void SyntaxHighlighter::applyFormatToSpaces(const QString &, const QTextCharFormat &) + {} +}; + } #endif //SYNTAXHIGHLIGHTER_H