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

Calling Object.getOwnPropertyDescriptor() on a QScriptClass property returns a data descriptor

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P4: Low
    • None
    • 4.6.0
    • Qt Script
    • None

    Description

      Arguably it should return an accessor descriptor, since the property is implemented using getter/setter functions.
      Creating the data descriptor means that we have to call the getter itself. Since we use getOwnPropertyDescriptor() to implement QScriptValue::propertyFlags(), this call is unexpected and unnecessary.

      In order to return an accessor descriptor, we would have to create function objects that bind the property name (since the QScriptClass methods themselves are catch-all accessors). Is it worth it...?

      Attachments

        Issue Links

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

          Activity

            People

              kenthans Kent Hansen (Inactive)
              kenthans Kent Hansen (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes