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

Qmllint throws warnings at TapHandler's signals

    XMLWordPrintable

Details

    • All
    • b7602fb64 (dev), 98781091c (6.7), 720fc36e6 (6.6)

    Description

      Minimal producer:

      import QtQuick
      import QtQuick.Controls
      
      ApplicationWindow {
          id: root
          visible: true
          TapHandler {
              acceptedButtons: Qt.LeftButton | Qt.RightButton
              onSingleTapped: (eventPoint, button) => {
                  console.log("Single tap at", eventPoint, "with button", button)
              }
              onTapped: console.log("tapped")
          }
      } 

      Both signals here generate a warning in qmllint:

      $ ninja all_qmllint
      
      Warning: /home/wayn/Qt/bugheaven/qmlsingleton/Main.qml:29:9: Type QEventPoint of parameter called eventPoint in signal called singleTapped required by the compilation of onSingleTapped cannot b
      e used.  [signal-handler-parameters]
              onSingleTapped: (eventPoint, button) => {
              ^^^^^^^^^^^^^^
      Warning: /home/wayn/Qt/bugheaven/qmlsingleton/Main.qml:32:9: Type QEventPoint of parameter called eventPoint in signal called tapped required by the compilation of onTapped cannot be used.  [signal-handler-parameters]
              onTapped: console.log("tapped")
              ^^^^^^^^
       

      (ignore the line mismatch in the warning. I have commented out some lines)

      Attachments

        Issue Links

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

          Activity

            People

              ulherman Ulf Hermann
              dennisoberst Dennis Oberst
              Votes:
              4 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes