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

Assigning undefined to property results in vague error message

    XMLWordPrintable

Details

    Description

      This error message should say something about the property not being resettable, or whatever the actual reason is, not just "Could not set initial property horizontalAlignment".

          Component {
              id: theComponent
              Item {
                  property int horizontalAlignment
              }
          }
          function test_stuff() {
              var data = ({})
              data.horizontalAlignment = undefined
              var properties = { horizontalAlignment: data.horizontalAlignment }
              // QWARN  : [...]tst_textarea.qml: Could not set initial property horizontalAlignment
              var object = theComponent.createObject(parent, properties);
          }
      

      Attachments

        Issue Links

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

          Activity

            People

              qtqmlteam Qt Qml Team User
              mitch_curtis Mitch Curtis
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes