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

qmlformat: Proper indentation after () => {...}

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • 6.11
    • 6.10.0
    • QML: Tooling
    • All

      For this code we had a correct original indentation, but the "fixed" version by qmlformat has too much indentation:

       The qml formatter tries to align subsequent lines to the opening brace '{' exceeding the maximum line length defined in the ini file. It therefore lowers the starting column.

      Note: anonymous function definitions used in bindings are not formatted the same way as simple JS function definitions. So the result is "intended". If we would like to treat function definitions within bindings the same way as function definitions without bindings we would need to create some kind of exception in the code to intentionally alter the behavior.

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

            qtqmlteam Qt Qml Team User
            ovidiu.tepescu Ovidiu Tepescu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes