• Icon: Sub-task Sub-task
    • Resolution: Invalid
    • Icon: P2: Important P2: Important
    • 4.8.0
    • Qt Script
    • None

      See http://doc.trolltech.com/4.7/qscriptengine.html#pushContext
      pushContext() is used to open up a new "evaluation scope"; effectively, it creates a new JS stack frame in which JavaScript can be evaluated without "polluting" the outer scope.
      This is useful functionality that we don't want to drop.
      However, push/popContext() is too low-level; we would like not to expose the stack frames directly.
      An alternative API could be something like this:

      QScriptEngine eng;
      {
          QScriptEvaluationScope scope(&eng);
          eng.evaluate("var foo = 123"); // "foo" would be defined in local scope
      }
      eng.evaluate("foo"); // ReferenceError - the scope where "foo" was defined no longer exists
      

        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:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes