aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cppeditor/cpphighlighter.h
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2023-04-12 12:15:12 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2023-04-13 11:36:12 +0000
commitb795b42980d24b8c3febb7d9c7c1fd6b6ff1ba9a (patch)
tree13f56f1e4e20a720ee3f696528a41b583b41cd1f /src/plugins/cppeditor/cpphighlighter.h
parent8fb258b85e82e2d520d1ae20226c3f89af22d019 (diff)
CppEditor: More special rendering for string literals
Display prefixes and suffixes different from the actual string, like we already did for raw string literals. This uncovered some minor bugs in both lexer and highlighter: - Wrong length for a setFormat() call in highlightRawStringLiteral() - Missing check for user-defined literal in raw string literals - Missing check for user-defined literal in multi-line strings Fixes: QTCREATORBUG-28869 Change-Id: I018717c50ddc1d09c609556161c85dfb0cc29fab Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/cppeditor/cpphighlighter.h')
-rw-r--r--src/plugins/cppeditor/cpphighlighter.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/cppeditor/cpphighlighter.h b/src/plugins/cppeditor/cpphighlighter.h
index 358fcb2760..1728ffeb77 100644
--- a/src/plugins/cppeditor/cpphighlighter.h
+++ b/src/plugins/cppeditor/cpphighlighter.h
@@ -29,6 +29,7 @@ private:
void highlightWord(QStringView word, int position, int length);
bool highlightRawStringLiteral(QStringView text, const CPlusPlus::Token &tk,
const QString &inheritedSuffix);
+ void highlightStringLiteral(QStringView text, const CPlusPlus::Token &tk);
void highlightDoxygenComment(const QString &text, int position,
int length);