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

QML/JS reformat breaks JavaScript lamda usage

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Not Evaluated Not Evaluated
    • None
    • Qt Creator 4.11.1
    • Quick / QML Support
    • None
    • Linux/X11

      Let's have a code:

      Ugly code with lambda
      QtObject{
                              property string text: qsTr("Destroy the code")
                              property var action: () => oh.no()
                          }
      

      Execute Tools->QML/JS->Reformat File
      And we end up with broken code:

      After Reformat
              QtObject {
                  property string text: qsTr("Destroy the code")
                  property var action: function  oh
                  oh oh.no()
                  )
              }
      

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

            Unassigned Unassigned
            travnick MikoĊ‚aj
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes