diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2021-08-18 14:57:19 +0300 |
---|---|---|
committer | Orgad Shaneh <orgads@gmail.com> | 2021-08-18 12:39:43 +0000 |
commit | c6ac773b9a2d6fc5cb581cd56785525d0a352a4a (patch) | |
tree | abf7001e6dfe4b78ae03388966dc6673ef84b640 /src/plugins/cpptools/cppcodeformatter.h | |
parent | 57243d4dc62db9ae4738c08c13ad84755fe23fb0 (diff) | |
download | qt-creator-c6ac773b9a2d6fc5cb581cd56785525d0a352a4a.tar.gz |
CppTools: Fix indentation of plain strings
Raw strings should not be indented, but old-style strings still should.
Amends commit ddf7f5f232d70c8598654fdad08af3064f95903f.
Fixes: QTCREATORBUG-25817
Change-Id: I7836388efb2d19b8b898c7463c7fa2d2077e80b2
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/cpptools/cppcodeformatter.h')
-rw-r--r-- | src/plugins/cpptools/cppcodeformatter.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/cpptools/cppcodeformatter.h b/src/plugins/cpptools/cppcodeformatter.h index 1164c12eb1..0da8061ccd 100644 --- a/src/plugins/cpptools/cppcodeformatter.h +++ b/src/plugins/cpptools/cppcodeformatter.h @@ -57,7 +57,7 @@ public: // calculates the state change introduced by changing a single line void updateLineStateChange(const QTextBlock &block); - bool isInStringLiteral(const QTextBlock &block) const; + bool isInRawStringLiteral(const QTextBlock &block) const; void indentFor(const QTextBlock &block, int *indent, int *padding); void indentForNewLineAfter(const QTextBlock &block, int *indent, int *padding); @@ -173,8 +173,8 @@ public: // must be public to make Q_GADGET introspection work lambda_instroducer, // when '=', '&' or ',' occurred within '[]' lambda_declarator, // just after ']' when previous state is lambda_introducer lambda_statement, // just after '{' when previous state is lambda_declarator or lambda_declarator_or_expression - string_open - + string_open, // after opening quote of simple string types, like ", L", u8" etc. + raw_string_open // after raw string open delimiter, like R"EOF( }; Q_ENUM(StateType) |