Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.9
-
None
-
86017b85c (dev), 8ea32b9d5 (6.9)
Description
Consider the following QML code:
import QtQuick Item { function bla() { for (let i = 0, j = 1; i < j; ++i) {} } }
Formatting it with 'qmlformat -i foo.qml' fails with
qt.qmldom.writeOut: writeOut of /home/nico/foo.qml created invalid code: ---------- import QtQuick Item { function bla() { for (let i = 0j = 1; i < j; ++i) {} } } ---------- /home/nico/foo.qml:5:23: [Dom][QmlFile][Parsing] Error: Expected token `;' for .currentItem qt.qmldom.writeOut: failure reformatting "foo.qml" Error while writing
Attachments
For Gerrit Dashboard: QTBUG-136192 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
643566,4 | qmlformat: fix for statement with multiple iterators | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
645346,2 | qmlformat: fix for statement with multiple iterators | 6.9 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
645537,1 | qmlformat: fix for statement with multiple iterators | 6.9.1 | qt/qtdeclarative | Status: INTEGRATING | +2 | 0 |
645542,2 | qmlformat: fix for statement with multiple iterators | tqtc/lts-6.8 | qt/tqtc-qtdeclarative | Status: MERGED | +2 | 0 |