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

QJSEngine::evaluate documentation example contains a failure

    XMLWordPrintable

    Details

    • Commits:
      ec2388860141dcde6387f4cba482955de648e5aa, b067e607f1cfd5bee94710d6a6a7c2fa048e9b23

      Description

      The example in the documentation uses two arguments for call while only one is permitted
      QJSValue fun = myEngine.evaluate("(function(a, b) { return a + b; })");QJSValueList args;args << 1 << 2;QJSValue threeAgain = fun.call(QJSValue(), args);
      While it should be
      QJSValue fun = myEngine.evaluate("(function(a, b) { return a + b; })");QJSValueList args;args << 1 << 2;QJSValue threeAgain = fun.call(args);

        Attachments

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

          Activity

            People

            Assignee:
            paulwicking Paul Wicking
            Reporter:
            laurent67 Laurent Schall
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes