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

Using eval() inside signal handler causes error on qml compiler

    XMLWordPrintable

Details

    Description

      Using following code causes error on QML compiler

      property string toto :"0.5+1920"
      Item{
          focus:true
          Keys.onPressed: {
              if(eval(toto))
              {
                  console.log(eval(toto));
              }
          }
      }

      And this is the error:

      error: error: The use of the arguments object in signal handlers is
      not supported when compiling qml files ahead of time, because it may be ambiguous if
      any signal parameter is called "arguments". Unfortunately we cannot distinguish
      between it being a parameter or the JavaScript arguments object at this point.
      Consider renaming the parameter of the signal if applicable.
      

       

      Attachments

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

        Activity

          People

            shausman Simon Hausmann
            misalmel Mika Salmela
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes