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

Details

    • All

    Description

      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.

       

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes