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

qmllint disable does not work for missing-type?

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2: Important P2: Important
    • 6.8.1, 6.8, 6.9.0 FF
    • 6.7.2
    • QML: Tooling
    • None
    • All
    • b027c76d1 (dev), 26ccb0081 (6.8)

      We have the following QML file:

      Item {
          id: root
      
          readonly property MyController controller: MyController {
              id: controller
          }
          property alias threadPool: controller.threadPool // qmllint disable missing-type
      
      [...]
      

      The code triggers the qmllint warning:

      [build] Warning: /home/user/Src/Project/qml/MyPage.qml:32:1: Cannot deduce type of alias "threadPool" [missing-type]
      [build] Item {
      [build] ^^^^
      

      There are multiple things that seem incorrect:

      • The line number in the error message points to Item instead of the actual type threadPool?
      • Why does the disable not work inline on the warning?

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

            sami.shalayel Sami Shalayel
            emmenlau Mario Emmenlauer
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes