Forked QSyntaxHighlighter from Qt 4.7.

We need our very own syntax highlighter in Qt Creator.
This commit is contained in:
Roberto Raggi
2010-07-09 14:47:18 +02:00
parent 32993f460a
commit 8acde74d79
21 changed files with 806 additions and 24 deletions

View File

@@ -46,7 +46,7 @@ static bool isVariable(const QString &word)
CMakeHighlighter::CMakeHighlighter(QTextDocument *document) :
QSyntaxHighlighter(document)
TextEditor::SyntaxHighlighter(document)
{
}

View File

@@ -30,6 +30,7 @@
#ifndef CMAKEHIGHLIGHTER_H
#define CMAKEHIGHLIGHTER_H
#include <texteditor/syntaxhighlighter.h>
#include <QtCore/QtAlgorithms>
#include <QtGui/QSyntaxHighlighter>
#include <QtGui/QTextCharFormat>
@@ -40,7 +41,7 @@ namespace Internal {
/* This is a simple syntax highlighter for CMake files.
* It highlights variables, commands, strings and comments.
* Multi-line strings and variables inside strings are also recognized. */
class CMakeHighlighter : public QSyntaxHighlighter
class CMakeHighlighter : public TextEditor::SyntaxHighlighter
{
Q_OBJECT
public: