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

[Reg] Local variables implemented as getter/setter properties on the activation object no longer works

    XMLWordPrintable

Details

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

    Description

      QScriptEngine eng;
      QScriptContext *ctx = eng.pushContext();
      QScriptValue act = ctx->activationObject();
      act.setProperty("act", act);
      eng.evaluate("act.__defineGetter__('x', function() { return 123; })");
      qDebug() << eng.evaluate("x").toString();
      

      With Qt 4.5, the above program prints "123", whereas with 4.6, it prints "ReferenceError: Can't find variable: x".
      I.e. you can no longer have local variables implemented as getter/setter properties.

      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