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

qmllint highlights wrong part in warning message

    XMLWordPrintable

Details

    • 3a9d1e458 (dev), 3b8cf1f9e (6.8), 40a83e3cb (6.7)

    Description

      Consider the following QML code:

      import QtQuick
      
      Item {
          function foo(bar: bool) : doesntexist {
          }
      } 

      Running qmllint on it produces

      Warning: l.qml:4:21: "doesntexist" was not found for the return type of method "foo". [unresolved-type]
      
          function foo(bar: bool) : doesntexist {
      
                          ^^^^^^
      

      It is correct that the doesntexist type does not exist, however the bar: bool parameter annotation is highlighted instead of the return type where the actual error is. This can also be seen in qmlls

      qtdeclarative commit 41a97f06981144ef80a3faf8925753f15c0ff3c6

      Attachments

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

        Activity

          People

            olivier.decanniere Olivier De Cannière
            nicolasfella Nicolas Fella
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes