summaryrefslogtreecommitdiff
path: root/src/libs/qmljs/qmljscodeformatter.cpp
diff options
context:
space:
mode:
authorChristian Kamm <christian.d.kamm@nokia.com>2012-09-10 10:39:16 +0200
committerChristian Kamm <christian.d.kamm@nokia.com>2012-09-10 14:21:57 +0200
commit0df593353953614e2657b5ddb6f31e1b2e9bcd49 (patch)
tree76de1842d493be35eca98f44c8acbbefb073a85d /src/libs/qmljs/qmljscodeformatter.cpp
parentb17e944d4bbff3cce7a9a2e9aab7e8b910ca8ad8 (diff)
downloadqt-creator-0df593353953614e2657b5ddb6f31e1b2e9bcd49.tar.gz
QmlJS indenter: Fix wrong indentation after list<> typed properties.
Task-number: QTCREATORBUG-7726 Change-Id: If709a9a71cfed69e2f14af92c114f79d11d03145 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
Diffstat (limited to 'src/libs/qmljs/qmljscodeformatter.cpp')
-rw-r--r--src/libs/qmljs/qmljscodeformatter.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libs/qmljs/qmljscodeformatter.cpp b/src/libs/qmljs/qmljscodeformatter.cpp
index 1a6d853a93..7eddf86e2b 100644
--- a/src/libs/qmljs/qmljscodeformatter.cpp
+++ b/src/libs/qmljs/qmljscodeformatter.cpp
@@ -198,18 +198,18 @@ void CodeFormatter::recalculateStateAfter(const QTextBlock &block)
switch (kind) {
case Colon: enter(binding_assignment); break; // oops, was a binding
case Var:
- case Identifier: enter(property_type); break;
+ case Identifier: enter(property_name); break;
case List: enter(property_list_open); break;
default: leave(true); continue;
} break;
- case property_type:
+ case property_name:
turnInto(property_maybe_initializer);
break;
case property_list_open:
if (m_currentLine.midRef(m_currentToken.begin(), m_currentToken.length) == QLatin1String(">"))
- turnInto(property_maybe_initializer);
+ turnInto(property_name);
break;
case property_maybe_initializer:
@@ -939,7 +939,7 @@ CodeFormatter::TokenKind CodeFormatter::extendedTokenKind(const QmlJS::Token &to
if (text == "on")
return On;
if (text == "list")
- return On;
+ return List;
} else if (kind == Keyword) {
const QChar char1 = text.at(0);
const QChar char2 = text.at(1);