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

qmllint: Warn about duplicates in grouped properties bindings

XMLWordPrintable

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

      `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.

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

            qtqmlteam Qt Qml Team User
            diseraluca Luca Di Sera
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes