summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cppqtstyleindenter.cpp
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2021-08-18 14:57:19 +0300
committerOrgad Shaneh <orgads@gmail.com>2021-08-18 12:39:43 +0000
commitc6ac773b9a2d6fc5cb581cd56785525d0a352a4a (patch)
treeabf7001e6dfe4b78ae03388966dc6673ef84b640 /src/plugins/cpptools/cppqtstyleindenter.cpp
parent57243d4dc62db9ae4738c08c13ad84755fe23fb0 (diff)
downloadqt-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/cppqtstyleindenter.cpp')
-rw-r--r--src/plugins/cpptools/cppqtstyleindenter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/cpptools/cppqtstyleindenter.cpp b/src/plugins/cpptools/cppqtstyleindenter.cpp
index 3eebaf1321..cc3f272c45 100644
--- a/src/plugins/cpptools/cppqtstyleindenter.cpp
+++ b/src/plugins/cpptools/cppqtstyleindenter.cpp
@@ -99,7 +99,7 @@ void CppQtStyleIndenter::indentBlock(const QTextBlock &block,
QtStyleCodeFormatter codeFormatter(tabSettings, codeStyleSettings());
codeFormatter.updateStateUntil(block);
- if (codeFormatter.isInStringLiteral(block))
+ if (codeFormatter.isInRawStringLiteral(block))
return;
int indent;
int padding;
@@ -137,7 +137,7 @@ void CppQtStyleIndenter::indent(const QTextCursor &cursor,
QTextCursor tc = cursor;
tc.beginEditBlock();
do {
- if (!codeFormatter.isInStringLiteral(block)) {
+ if (!codeFormatter.isInRawStringLiteral(block)) {
int indent;
int padding;
codeFormatter.indentFor(block, &indent, &padding);