From 0e4dd15a90c119cea4ada833d88b51e336f53ee7 Mon Sep 17 00:00:00 2001 From: Roberto Raggi Date: Thu, 25 Feb 2010 10:34:28 +0100 Subject: 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 } } --- src/declarative/qml/parser/qdeclarativejslexer.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/declarative/qml/parser/qdeclarativejslexer.cpp') diff --git a/src/declarative/qml/parser/qdeclarativejslexer.cpp b/src/declarative/qml/parser/qdeclarativejslexer.cpp index 384d00c98d..34163a4c98 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: { -- cgit v1.2.1