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

qmlformat: Support grouping properties by inheritance source

    XMLWordPrintable

Details

    Description

      Input

      import QtQuick.Controls.Basic
      
      TextField {
      width: 200
      height: 50
      color: "blue"
      hoverEnabled: true
      objectName: "Test"
      }
      

       

      Current output
      qmlformat --normalize

      import QtQuick.Controls.Basic
      
      TextField {
          color: "blue"
          height: 50
          hoverEnabled: true
          objectName: "Test"
          width: 200
      }
      

       

      Suggested other output
      qmlformat --normalize --type-property-grouping

      import QtQuick.Controls.Basic
      
      TextField {
          // QtObject properties
          objectName: "Test"
      
          // Item properties
          height: 50
          width: 200
      
          // TextInput properties
          color: "blue"
      
          // TextField properties
          hoverEnabled: true
      }
      

      (Perhaps with another flag for enabling/disabling the comments?)

      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
            skoh-qt Sze Howe Koh
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes