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

qmllint: Add plugin warning to default ini file

    XMLWordPrintable

Details

    Description

      The warning below can be disabled using an inline comment (// qmllint disable). However,

      • qmllint does not seem to accept any arguments that can configure this warning
      • qmllint --write-defaults does not produce a field in .qmllint.ini that can configure it

       

      Code

      import QtQuick
      import QtQuick.Layouts
      
      Window {
          id: root
          width: 640
          height: 480
          
          ColumnLayout {
              anchors.fill: parent
              Rectangle {
                  color: "red"
                  width: 50
              }
              Rectangle {
                  color: "green"
              }
          }
      }
      

       

      qmllint output

      Warning: Main.qml:14:20: Detected width on an item that is managed by a layout. This is undefined behavior; use implicitWidth or Layout.preferredWidth instead. [Quick.layout-positioning]
                  width: 50
                         ^^
      

      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
              skoh-qt Sze Howe Koh
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes