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

Property definitions that attempt to override JS Global Object are silently ignored

    XMLWordPrintable

Details

    Description

      Relevant doc: "QML disallows element, id and property names that conflict with the properties on the global object to prevent any confusion."
      If you try to use a Global Object property name as id, you get an error, as expected. However, when a property definition attempts to override such a property, the definition is silently ignored.
      Example:

      import Qt 4.7
      Item {
          property string parseInt: "hello"
          Component.onCompleted: console.log(parseInt);
      }
      

      Output:

      function parseInt() {
      [native code]
      }

      Attachments

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

        Activity

          People

            aakenned Aaron Kennedy
            kenthans Kent Hansen (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