summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cppcodeformatter.h
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2020-08-13 17:58:40 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2020-08-20 08:10:22 +0000
commitddf7f5f232d70c8598654fdad08af3064f95903f (patch)
treef3267c7d5d2c34636fdb088cd93bfe75809bb1b9 /src/plugins/cpptools/cppcodeformatter.h
parentd6c3846ab1c26ba6a1e6aea7df6e2119d50e9d4b (diff)
downloadqt-creator-ddf7f5f232d70c8598654fdad08af3064f95903f.tar.gz
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 <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/cpptools/cppcodeformatter.h')
-rw-r--r--src/plugins/cpptools/cppcodeformatter.h1
1 files changed, 1 insertions, 0 deletions
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);