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

qmllint does not recognize JS array functions on QQmlListProperty

XMLWordPrintable

    • 1879c8a6ba (qt/qtdeclarative/dev) 1879c8a6ba (qt/tqtc-qtdeclarative/dev)

      Code

      import QtQuick
      
      Item {
          id: root
          property Item dummy: Item {}
      
          Component.onCompleted: {
              console.log("Before pushing: " + root.children.length)
              root.children.push(root.dummy)
              console.log("After pushing: " + root.children.length)
          }
      }
      

       

      QML output

      qml: Before pushing: 0
      qml: After pushing: 1
      

       

      qmllint output

      Warning: ListPush.qml:9:17: Property "push" not found on type "QQmlListProperty<QObject>"
                      root.children.push(root.dummy)
                                    ^^^^
      

        For Gerrit Dashboard: QTBUG-104706
        # Subject Branch Project Status CR V

            ulherman Ulf Hermann
            skoh-qt Sze Howe Koh
            Votes:
            6 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes