summaryrefslogtreecommitdiff
path: root/src/plugins/qmljstools/qmljsrefactoringchanges.cpp
diff options
context:
space:
mode:
authorChristian Kamm <christian.d.kamm@nokia.com>2011-10-24 12:29:54 +0200
committerChristian Kamm <christian.d.kamm@nokia.com>2011-10-31 09:37:17 +0100
commita9553c494ef6012cc4c34bd469ff0f20ee2e2671 (patch)
tree00ae228a45485c54077f0541878a352f91a602b5 /src/plugins/qmljstools/qmljsrefactoringchanges.cpp
parentf3774d0a6f8fc71c806a84d6b207bde29d967ff4 (diff)
downloadqt-creator-a9553c494ef6012cc4c34bd469ff0f20ee2e2671.tar.gz
QmlJS indenter: Never touch indent of multi-line strings.
Task-number: QTCREATORBUG-6368 Change-Id: Iae68427e429e625214bc0729aaaf313dc3371570 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
Diffstat (limited to 'src/plugins/qmljstools/qmljsrefactoringchanges.cpp')
-rw-r--r--src/plugins/qmljstools/qmljsrefactoringchanges.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/qmljstools/qmljsrefactoringchanges.cpp b/src/plugins/qmljstools/qmljsrefactoringchanges.cpp
index 56b9d8486b..0af657472a 100644
--- a/src/plugins/qmljstools/qmljsrefactoringchanges.cpp
+++ b/src/plugins/qmljstools/qmljsrefactoringchanges.cpp
@@ -69,7 +69,9 @@ public:
codeFormatter.updateStateUntil(block);
do {
- tabSettings.indentLine(block, codeFormatter.indentFor(block));
+ const int depth = codeFormatter.indentFor(block);
+ if (depth != -1)
+ tabSettings.indentLine(block, depth);
codeFormatter.updateLineStateChange(block);
block = block.next();
} while (block.isValid() && block != end);