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

Qmlformat issue with let inside for loop

    XMLWordPrintable

Details

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

    Description

      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

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes