Details
-
Task
-
Resolution: Done
-
P2: Important
-
None
-
None
-
c177691118e4e2bace9b5c1f4f57343190e6ad64 0dd867535bebf6db673d4f03959e62e94ff35ba2 43c516be86fb0b825b27144a68d837b87c3e1a23 c648598a8ba8bf72b5d556211df877578d5f5b64 fdbdbbdd4ff05d1ceb7667227db5b14687a77c96
Description
As per QTBUG-20826 we currently do not support sequence types in QML. This task is to determine what level of sequence support is possible in QML, and to implement it. A large amount of research and prototyping has already been done (see http://codereview.qt-project.org/#change,2838 and http://codereview.qt-project.org/#change,2903) but no code that is ready for integration into mainline exists.
Requirements:
1) Sequences of common stack types (at least int, qreal, bool) must be supported
2) Performance must be a primary consideration
3) Syntax must be consistent (ie, in QML, doing someObj.listProperty[3] = someValue; MUST update (write-back) the list in the someObj).
4) Allow assignment of single values to sequence types in QML (eg, string to stringlist property)
Steps:
1) Determine whether (and how) it would be possible to support value types in sequences properly (eg, being able to do someObj.vectorListProperty[3].x = someXValue; must work). If not, don't "half" support sequences of these types.
2) Polish prototype code into final state
3) Write unit tests
4) Write documentation
-----------------------
Current status (30/09/2011):
Prototype code exists for various sequence types, including unit tests, however value-type support is still imperfect.
-----------------------
Current status (05/10/2011):
Researching whether the solution can be simplified (at the moment the sequence-type specific wrapper classes are QObject-derived; if this is not required, we can use template classes to implement the wrappers, greatly reducing LOC required).
-----------------------
Current status (17/10/2011):
Rewrote solution so that the wrapper classes are not QObject-derived, cleaned up the code, significantly expanded the unit tests. Code is currently awaiting review.