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

Qmlformat issue with let inside for loop

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2: Important P2: Important
    • 6.5
    • 6.3.1
    • QML: Tooling
    • Linux/Wayland
    • 84dd339e2eb3385eb143f9d5ab282a135635052d

      Qmlformat replace let with var in for loop defintion

      import QtQuick 2
      
      Rectangle {
          property int a: {
              let b = 1;
              for (let c = 0; c < 20; c++) {
                  c += 1;
              }
          }
      }
      

      with

      import QtQuick 2
      
      Rectangle {
          property int a: {
              let b = 1;
              for (var c = 0; c < 20; c++) {
                  c += 1;
              }
          }
      }
      

      I also get a qt.qmldom.writeOut: reparsed writeOut of file.qml has changes

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

            qtqmlteam Qt Qml Team User
            carl Carl Schwan
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes