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

qmlformat: comments pushed outside {} block

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • 6.8
    • 6.8.0
    • QML: Tooling
    • None

    Description

      If block is fully commented inside, the comments are pushed to the outside, leaving empty {}.

      Input:

      MouseArea {
        onClicked: {
          console.log("clicked");
        }
      
        Component.onCompleted: {
          if (true) {
            console.log("completed");
          }
        }
      }
      

      Output:

      MouseArea {
        onClicked:
        //console.log("clicked");
        {}
      
        Component.onCompleted: {
          if (true)
          //console.log("completed");
          {}
        }
      }
      

       

      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
            svlasov Sergey Vlasov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes