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

Integer property in ListElement should be undefined if there is no value assigned explicitly

XMLWordPrintable

    • All

      ListModel {
          ListElement { type: "Command"; commandId: 1 } 
          ListElement { type: "Command"; commandId: 2 } 
          ListElement { type: "NotCommand"; } 
      }
      

      The ListElement with type "Command" will assign commandId with integer.
      The type "NotCommand" will not assign commandId at all.
      The bug is that when access the commandId of the third item, it will return an integer value 0.
      Actually, i expect the value as undefined. if the commandId is string value, the value is undefined as expected.

       

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

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            bugman Vico Liang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes