diff options
author | mae <qt-info@nokia.com> | 2009-04-21 17:10:54 (GMT) |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2009-04-24 08:05:54 (GMT) |
commit | 6cff4b9dcc3095cb2dfc1dc9653a7bf958fe91d3 (patch) | |
tree | 73df58dd759fa30be7730d56f9689038ef891a47 /src | |
parent | 2c0e87db61c4f5e31585b7b0d4d6f5f7ad25a5f5 (diff) | |
download | Qt-6cff4b9dcc3095cb2dfc1dc9653a7bf958fe91d3.zip Qt-6cff4b9dcc3095cb2dfc1dc9653a7bf958fe91d3.tar.gz Qt-6cff4b9dcc3095cb2dfc1dc9653a7bf958fe91d3.tar.bz2 |
experiment with treating State and Transition slightly special: they are automatically added to the states resp. transitions property. This allows us to make the [...,...,...,...] list syntax superfluous.
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/qml/qmlscriptparser.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/declarative/qml/qmlscriptparser.cpp b/src/declarative/qml/qmlscriptparser.cpp index 22169a5..03e6165 100644 --- a/src/declarative/qml/qmlscriptparser.cpp +++ b/src/declarative/qml/qmlscriptparser.cpp @@ -397,6 +397,16 @@ Object *ProcessAST::defineObjectBinding(int line, } return 0; + } else if(!currentProperty() && objectType == QLatin1String("State")) { + _stateStack.pushProperty(QLatin1String("states"), line); + Object *obj = defineObjectBinding_helper(line, 0, objectType, initializer); + _stateStack.pop(); + return obj; + } else if (!currentProperty() && objectType == QLatin1String("Transition")) { + _stateStack.pushProperty(QLatin1String("transitions"), line); + Object *obj = defineObjectBinding_helper(line, 0, objectType, initializer); + _stateStack.pop(); + return obj; } return defineObjectBinding_helper(line, qualifiedId, objectType, initializer); |