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

[Reg 6.7.2->6.8.0b3] qmllint no longer fails when warnings are found

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P1: Critical
    • None
    • 6.8.0 Beta3
    • QML: Tooling
    • None
    • 4f6519eed (dev), e9affd88a (6.8)

    Description

      When running this simple QML example against qmllint, the return code differs between Qt 6.7.2 and Qt 6.8.0 Beta 3.

      import QtQuick
      
      Item {
      	id: root
      
      	readonly property int foo: 1337
      
      	Text {
      		text: "Some text %1".arg(foo)
      	}
      }
      

      Both detect the issue:

      Warning: mweQmllint.qml:9:28: Unqualified access [unqualified]
      		text: "Some text %1".arg(foo)
                               		^^^
      Info: foo is a member of a parent element.
            You can qualify the access with its id to avoid this warning.
      
      		text: "Some text %1".arg(root.foo)
                               		^^^^^
      

      Qt 6.7.2 returns 255 whereas Qt 6.8.0 Beta 3 returns 0. Checked with

      qmllint mweQmllint.qml; echo $?
      

      This results in problems if qmllint is run as part of unittests.

      Attachments

        Issue Links

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

          Activity

            People

              qtqmlteam Qt Qml Team User
              janmoeller Jan Möller
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes