summaryrefslogtreecommitdiff
path: root/src/plugins/cppeditor/cpphighlighter.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@nokia.com>2009-10-09 15:23:19 +0200
committerErik Verbruggen <erik.verbruggen@nokia.com>2009-10-09 15:23:19 +0200
commitd61eb9c8936807d8e6d8fdbbaa2d53a4c3f3a700 (patch)
tree80afe483be2439270fbd882c42c1e624a20190d5 /src/plugins/cppeditor/cpphighlighter.cpp
parent4b44fa5f4ad4941d27e96f40b269367da2cfbf22 (diff)
downloadqt-creator-d61eb9c8936807d8e6d8fdbbaa2d53a4c3f3a700.tar.gz
Syntax highlighting for Objective-C identifiers (super, self, nil, Nil, _cmd, SEL, IMP, BOOL, YES, NO, id).
Diffstat (limited to 'src/plugins/cppeditor/cpphighlighter.cpp')
-rw-r--r--src/plugins/cppeditor/cpphighlighter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/cppeditor/cpphighlighter.cpp b/src/plugins/cppeditor/cpphighlighter.cpp
index b2db7a8e42..00f307f7e0 100644
--- a/src/plugins/cppeditor/cpphighlighter.cpp
+++ b/src/plugins/cppeditor/cpphighlighter.cpp
@@ -61,6 +61,7 @@ void CppHighlighter::highlightBlock(const QString &text)
SimpleLexer tokenize;
tokenize.setQtMocRunEnabled(false);
+ tokenize.setObjCEnabled(true);
int initialState = state;
const QList<SimpleToken> tokens = tokenize(text, initialState);
@@ -157,7 +158,7 @@ void CppHighlighter::highlightBlock(const QString &text)
initialState = 0;
}
- } else if (tk.isKeyword() || isQtKeyword(tk.text()) || tk.isObjCAtKeyword())
+ } else if (tk.isKeyword() || isQtKeyword(tk.text()) || tk.isObjCAtKeyword() || tk.isObjCTypeQualifier())
setFormat(tk.position(), tk.length(), m_formats[CppKeywordFormat]);
else if (tk.isOperator())