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

Enum property values should not be returned as QVariant objects

    XMLWordPrintable

Details

    • 38bc71e414e83e36d47761f3309859e89486d853

    Description

      When accessed from QML, the Component "status" property is returned as a QVariant and not a plain number value.

      Example:

       
       import Qt 4.7
      
       Rectangle {
      
           Component {
               id: aa
               Item {}
           }
      
           Component.onCompleted: {
               print(aa.status)
           }
       }
      

      This outputs "QVariant(QDeclarativeComponent::Status)" instead of "1".

      This can be fixed by changing QDeclarativeObjectScriptClass::property() to handle enum values.

      Attachments

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

        Activity

          People

            bealam Bea Lam (closed Nokia identity) (Inactive)
            bealam Bea Lam (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes