forked from qt-creator/qt-creator
Forked QSyntaxHighlighter from Qt 4.7.
We need our very own syntax highlighter in Qt Creator.
This commit is contained in:
@@ -46,7 +46,7 @@ static bool isVariable(const QString &word)
|
||||
|
||||
|
||||
CMakeHighlighter::CMakeHighlighter(QTextDocument *document) :
|
||||
QSyntaxHighlighter(document)
|
||||
TextEditor::SyntaxHighlighter(document)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user