Commit 442737d6 authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer
Browse files

Renamed CPPHighlighter to CppHighlighter

Lowercase is the more prevalent style in this plugin and CppTools.
Unfortunately CPPEditor can't be named CppEditor cause of the CppEditor
namespace.
parent 1efe7199
......@@ -155,7 +155,7 @@ CPPEditor::CPPEditor(QWidget *parent) :
setParenthesesMatchingEnabled(true);
setMarksVisible(true);
setCodeFoldingVisible(true);
baseTextDocument()->setSyntaxHighlighter(new CPPHighlighter);
baseTextDocument()->setSyntaxHighlighter(new CppHighlighter);
// new QShortcut(QKeySequence("Ctrl+Alt+M"), this, SLOT(foo()), 0, Qt::WidgetShortcut);
#ifdef WITH_TOKEN_MOVE_POSITION
......@@ -683,7 +683,7 @@ const char *CPPEditorEditable::kind() const
void CPPEditor::setFontSettings(const TextEditor::FontSettings &fs)
{
TextEditor::BaseTextEditor::setFontSettings(fs);
CPPHighlighter *highlighter = qobject_cast<CPPHighlighter*>(baseTextDocument()->syntaxHighlighter());
CppHighlighter *highlighter = qobject_cast<CppHighlighter*>(baseTextDocument()->syntaxHighlighter());
if (!highlighter)
return;
......
......@@ -44,13 +44,13 @@ using namespace CppEditor::Internal;
using namespace TextEditor;
using namespace CPlusPlus;
CPPHighlighter::CPPHighlighter(QTextDocument *document) :
CppHighlighter::CppHighlighter(QTextDocument *document) :
QSyntaxHighlighter(document)
{
visualSpaceFormat.setForeground(Qt::lightGray);
}
void CPPHighlighter::highlightBlock(const QString &text)
void CppHighlighter::highlightBlock(const QString &text)
{
QTextCharFormat emptyFormat;
......@@ -200,7 +200,7 @@ void CPPHighlighter::highlightBlock(const QString &text)
}
bool CPPHighlighter::isPPKeyword(const QStringRef &text) const
bool CppHighlighter::isPPKeyword(const QStringRef &text) const
{
switch (text.length())
{
......@@ -255,7 +255,7 @@ bool CPPHighlighter::isPPKeyword(const QStringRef &text) const
return false;
}
bool CPPHighlighter::isQtKeyword(const QStringRef &text) const
bool CppHighlighter::isQtKeyword(const QStringRef &text) const
{
switch (text.length()) {
case 4:
......@@ -290,7 +290,7 @@ bool CPPHighlighter::isQtKeyword(const QStringRef &text) const
return false;
}
void CPPHighlighter::highlightWord(QStringRef word, int position, int length)
void CppHighlighter::highlightWord(QStringRef word, int position, int length)
{
// try to highlight Qt 'identifiers' like QObject and Q_PROPERTY
// but don't highlight words like 'Query'
......
......@@ -44,12 +44,12 @@ namespace Internal {
class CPPEditor;
class CPPHighlighter : public QSyntaxHighlighter
class CppHighlighter : public QSyntaxHighlighter
{
Q_OBJECT
public:
CPPHighlighter(QTextDocument *document = 0);
CppHighlighter(QTextDocument *document = 0);
virtual void highlightBlock(const QString &text);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment