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

qmllint: Signal handlers are not identified correctly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 6.x
    • 5.15.0 Beta2
    • QML: Tooling
    • 69be96b97833cf45c72e8a29834b521e4523c507 (qt/qtdeclarative/dev)

    Description

      Such valid QML file

      Rectangle {
          id: messenger
      
          signal send( string person, string notice)
      
          onSend: {
              console.log("For " + person + ", the notice is: " + notice)
          }
      
          Component.onCompleted: messenger.send("Tom", "the door is ajar.")
      } 
      

      will generate false positive warnings:

      $ qmllint -U test.qml 
      Warning: no matching signal found for handler "onSend" at 8:5
          onSend: {
          ^^^^^^
      Warning: unqualified access at 9:30
              console.log("For " + person + ", the notice is: " + notice)
                                   ^^^^^^
      
      Warning: unqualified access at 9:61
              console.log("For " + person + ", the notice is: " + notice)
      

      Attachments

        For Gerrit Dashboard: QTBUG-83793
        # Subject Branch Project Status CR V

        Activity

          People

            ulherman Ulf Hermann
            jacek.nijaki Jacek Nijaki
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes