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

qmllint: Property "length" not found on type "QQuickItem" (contentChildren)

    XMLWordPrintable

Details

    • b916c1bffdd4bcaaa6d4d75d2a9efa34a485cff5 (qt/qtdeclarative/dev)

    Description

      When I run qmllint against my code it reports that contentChildren has no length property.
      I can reproduce the same problem with qt5/qtquickcontrols2/tests/auto/customization/data/styles/simple/Frame.qml .

      But length property should be known for qmllint, because of "strace" utility shows that actually qmllint reads QtQuick/Templates.2/plugins.qmltypes.
      And this file contains:

      QQuickFrame -> prototype: "QQuickPane", and Component name: "QQuickPane",
      has property
      'Property

      { name: "contentChildren"; type: "QQuickItem"; isList: true; isReadonly: true }

      ',

      so by idea qmllint has all suitable information.

      qtdeclarative 1c5de027d0c31d1d6697bd0557128d92207763d8

      $ /usr/local/qt5_tools/bin/qmllint -I /usr/local/qt5_tools/qml ~/bigdisk1/projects/cpp-infra/qt5/qtquick
      controls2/tests/auto/customization/data/styles/simple/Frame.qml
      
      Warning: Property "length" not found on type "QQuickItem" at /home/evgeniy/bigdisk1/projects/cpp-infra/qt5/qtquickcontrols2/tests/auto/customization/data/styles/simple/Frame.qml:65:65
          contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
                                                                      ^^^^^^
      
      Warning: Property "length" not found on type "QQuickItem" at /home/evgeniy/bigdisk1/projects/cpp-infra/qt5/qtquickcontrols2/tests/auto/customization/data/styles/simple/Frame.qml:66:67
          contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
                                                                        ^^^^^^
      

      Attachments

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

        Activity

          People

            ulherman Ulf Hermann
            evgeniy_dushistov evgeniy_dushistov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes