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

Create a qmllint check for StackView pushItems and replaceItems property arguments

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P2: Important
    • 6.9
    • None
    • QML: Tooling
    • None

    Description

      The series starting with https://codereview.qt-project.org/c/qt/qtdeclarative/+/479798 adds pushItems and replaceItems functions that are QML compiler-friendly alternatives to push and replace. As they aim to be similar to the original API, they support the [item, properties, item, properties, ...] argument format:

      // With properties:
          stackView.push([
              item, { "color": "red" },
              rectComponent, { "color": "green" },
              Qt.resolvedUrl("MyItem.qml"), { "color": "blue" }
          ])
      
          // With properties for only some items:
          stackView.push([
              item, { "color": "yellow" },
              rectComponent
          ])
      

      It was suggested in https://codereview.qt-project.org/c/qt/qtdeclarative/+/479798/27/src/quicktemplates/qquickstackview.cpp#1005 that there should be a qmllint check for this.

      Attachments

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

        Activity

          People

            qtqmlteam Qt Qml Team User
            mitch_curtis Mitch Curtis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes