From ddf7f5f232d70c8598654fdad08af3064f95903f Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Thu, 13 Aug 2020 17:58:40 +0200 Subject: CppTools: Do not indent within string literals Multi-line strings must be kept as the user wrote them. Fixes: QTCREATORBUG-20180 Change-Id: I141eff52b55d31215e6f5c6c5a0e026689db877a Reviewed-by: David Schulz --- src/plugins/cpptools/cppcodeformatter.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/plugins/cpptools/cppcodeformatter.h') diff --git a/src/plugins/cpptools/cppcodeformatter.h b/src/plugins/cpptools/cppcodeformatter.h index b55724dc65..cf3eab98cb 100644 --- a/src/plugins/cpptools/cppcodeformatter.h +++ b/src/plugins/cpptools/cppcodeformatter.h @@ -57,6 +57,7 @@ public: // calculates the state change introduced by changing a single line void updateLineStateChange(const QTextBlock &block); + bool isInStringLiteral(const QTextBlock &block) const; void indentFor(const QTextBlock &block, int *indent, int *padding); void indentForNewLineAfter(const QTextBlock &block, int *indent, int *padding); -- cgit v1.2.1