Revision 66a3a45...
Go back to digest for 9th February 2014Other in Other
Refacture object creation & property type handling
This commit brings a refactoring of how
- the meta code from the parser looks like (it's now using javascript
constructors more extensively)
- QML elements are constructed (mostly moving code around)
- property values are assigned to the properties. Now each property has a
proper type and the new value will be passed to a constructor to match the
type. This considers basic types like integer, strings, colors and lists as
well as object types like Item, Rectangle or Component (assigning a Rectangle
to an Item-property is handled correctly (create a rectangle) as well as
assigning it to a component (create a component)).
Moreover property values are now assigned to the properties during the object
construction. Bindings are assigned but not evaluated. The evaluation happens in
a second run after all objects are created (prior all property values were
assigned here). This fixes context problems with object type properties (like
states) in conjunction with components (see last commit) and fixes the issue
that those objects were created multiple times.
File Changes
- src/parser.js
- src/qtcore.js