Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-16478 QtScript API changes for Qt 5
  3. QTBUG-17087

Improve QScriptClass API for prototype usage

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Invalid
    • Icon: P4: Low P4: Low
    • 5.0.0
    • Qt Script
    • None

      Currently it's not possible to use QScriptClass to create a "fallback" object in the prototype chain, i.e. one that handles any property access if it's not handled by the instance ("this") itself.

      If you put a QScriptClass-based object in the prototype chain, the object argument received in e.g. the queryProperty() reimplementation will be the QScriptClass instance, not the this-object. This is confusing; the methods should be named queryOwnProperty() and ownProperty().

      The QScriptable class provides the this-object, but it's specific to QObjects. A general-purpose solution for being able to handle property access through a prototype object would be nice.

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes