Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-27198

Unexpected auto-indent result for QML slots with arguments

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • Qt Creator 6.0.2
    • Quick / QML Support
    • None
    • Windows

    Description

      To reproduce add this code to any qml file:

          MouseArea
          {
              anchors.fill: parent
              onClicked: (mouse)=>
              {
              }
          }
      

      Select it and press CTRL+I
      The code changes to this:

          MouseArea
          {
              anchors.fill: parent
              onClicked: (mouse)=>
                         {
                         }
          }
      

      To stay consistent, the brackets should stay in line with the block name, like it works for items (MouseArea in this example) and for slots without arguments:

          MouseArea
          {
              anchors.fill: parent
              onClicked:
              {
              }
          }
      

      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
            alexey89 alexey89
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes