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

inline (arrow) function syntax causes incorrect indentation after return key pressed

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • Qt Creator 12.0.2
    • Quick / QML Support
    • None

    Description

      With this syntax, I the cursor is at the end of the `delegate.row;` and then return is pressed, the line that is inserted is indented too much.

      The alternative function(event) syntax below puts the correct indent.

       

                  Keys.onPressed: (event) => {
                      let row = delegate.row;
                                      [cursor]

       

                  Keys.onPressed: function(event) {
                      let row = delegate.row
                      [cursor]

      This is reproduced with Qt Creator 12.0.2.

      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
            michaelcox Michael Cox
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes