Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-13640

ListModel allows syntax that it doesn't support

    XMLWordPrintable

Details

    Description

      The following example shows two definitions of "object" in a ListModel, neither of which give any errors

      ListModel {
          id: listModel
          ListElement {
              object: ListElement {
                  name: "john"
              }
          }
          ListElement {
              object {
                  name: "sara"
              }
          }
      }

      in a binding, model.object is found, but model.object.name returns undefined.

      ListModel should either error on the above syntax, or work properly when accessing the values (ideally the former for now, and the latter in a later version).

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            brasser Michael Brasser (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes