diff options
author | Roberto Raggi <roberto.raggi@nokia.com> | 2010-02-25 09:34:28 (GMT) |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2010-02-25 09:34:28 (GMT) |
commit | 0e4dd15a90c119cea4ada833d88b51e336f53ee7 (patch) | |
tree | 86eef14fe41bc50e0f638e91227e5ad96a5181de /src/declarative/qml/parser/qdeclarativejslexer.cpp | |
parent | 75d61cbd7d2c72abb1fcf486c97bbb7429aea81b (diff) | |
download | Qt-0e4dd15a90c119cea4ada833d88b51e336f53ee7.zip Qt-0e4dd15a90c119cea4ada833d88b51e336f53ee7.tar.gz Qt-0e4dd15a90c119cea4ada833d88b51e336f53ee7.tar.bz2 |
Introduced alternative syntax for defining QML bindings.
Now it is possible to define bindings using the `on' context keyword.
For example, you can write
Behavior on opacity {
NumberAnimation { duration: 500 }
}
instead of
opacity: Behavior {
NumberAnimation { duration: 500 }
}
Diffstat (limited to 'src/declarative/qml/parser/qdeclarativejslexer.cpp')
-rw-r--r-- | src/declarative/qml/parser/qdeclarativejslexer.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/declarative/qml/parser/qdeclarativejslexer.cpp b/src/declarative/qml/parser/qdeclarativejslexer.cpp index 384d00c..34163a4 100644 --- a/src/declarative/qml/parser/qdeclarativejslexer.cpp +++ b/src/declarative/qml/parser/qdeclarativejslexer.cpp @@ -166,6 +166,8 @@ int Lexer::findReservedWord(const QChar *c, int size) const return QDeclarativeJSGrammar::T_IN; else if (c[0] == QLatin1Char('a') && c[1] == QLatin1Char('s')) return QDeclarativeJSGrammar::T_AS; + else if (c[0] == QLatin1Char('o') && c[1] == QLatin1Char('n')) + return QDeclarativeJSGrammar::T_ON; } break; case 3: { |