Details

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

    Description

      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
      

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes