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

qmllint: Warn about duplicates in grouped properties bindings

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • P2: Important
    • Some future release
    • None
    • QML: Tooling
    • None

    Description

      `qmllint` implements a warning for duplicated bindings.

      For example:

      Item {
          property int hello: 20
          hello: 30
      

      The second binding for `hello` will produce a warning.

      Currently, this warning is implemented so that bindings to grouped properties are not warned about.

      For example:

      Text {
          font { pixelSize: 12 }
          font { pixelSize: 20 }
      }
      

      No warning will be issued for `font.pixelSize`, albeit it is bound twice.

      Similarly in:

      Text {
          font { pixelSize: 12, pixelSize: 12 }
      }
      

      Will not produce a warning albeit `pixelSize` is bound twice in the same group.

      `qmllint` should extend the surface of its duplicated binding warning to cover both cases and, more generally, bindings to grouped properties.

      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
              diseraluca Luca Di Sera
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes