diff options
author | Leandro Melo <leandro.melo@nokia.com> | 2012-06-06 13:41:22 +0200 |
---|---|---|
committer | hjk <qthjk@ovi.com> | 2012-06-06 14:55:07 +0200 |
commit | 23c637c4f677ab2f19793f409297b0131b21dcaa (patch) | |
tree | c940f0eddbc83bfc5ba3ee9e39c3833f45729cde /src/plugins/cppeditor/cpphighlighter.cpp | |
parent | b88a5f5d381b4279f6aa93e1400d78d910f1ed15 (diff) |
C++: Introduce unicode char/strings support
Those are the types char16_t and char32_t along with the new
char/string literals u'', U'', u"", u8"", and U"".
This is particularly important for the use of QStringLiteral
since in some platforms it relies on expansion such as above.
Note: The string literals quickfixes still need some tunning.
Task-number: QTCREATORBUG-7449
Change-Id: Iebcfea15677dc8e0ebb6143def89a5477e1be7d4
Reviewed-by: hjk <qthjk@ovi.com>
Diffstat (limited to 'src/plugins/cppeditor/cpphighlighter.cpp')
-rw-r--r-- | src/plugins/cppeditor/cpphighlighter.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/plugins/cppeditor/cpphighlighter.cpp b/src/plugins/cppeditor/cpphighlighter.cpp index b0bdb679c8..3c40b2cadb 100644 --- a/src/plugins/cppeditor/cpphighlighter.cpp +++ b/src/plugins/cppeditor/cpphighlighter.cpp @@ -167,15 +167,10 @@ void CppHighlighter::highlightBlock(const QString &text) } else if (tk.is(T_NUMERIC_LITERAL)) setFormat(tk.begin(), tk.length(), m_formats[CppNumberFormat]); - else if (tk.is(T_STRING_LITERAL) || tk.is(T_CHAR_LITERAL) || tk.is(T_ANGLE_STRING_LITERAL) || - tk.is(T_AT_STRING_LITERAL)) - setFormat(tk.begin(), tk.length(), m_formats[CppStringFormat]); - - else if (tk.is(T_WIDE_STRING_LITERAL) || tk.is(T_WIDE_CHAR_LITERAL)) + else if (tk.isStringLiteral() || tk.isCharLiteral()) setFormat(tk.begin(), tk.length(), m_formats[CppStringFormat]); else if (tk.isComment()) { - if (tk.is(T_COMMENT) || tk.is(T_CPP_COMMENT)) setFormat(tk.begin(), tk.length(), m_formats[CppCommentFormat]); |