Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Not Evaluated
-
Resolution: Fixed
-
Affects Version/s: Qt Creator 5.0.0, Qt Creator 5.0.1, Qt Creator 6.0.0, Qt Creator 6.0.1
-
Fix Version/s: Qt Creator 7.0.0-beta2
-
Component/s: Quick / QML Support
-
Labels:None
Description
The QML formatter in QtCreator failed to format the following qml content:
import QtQuick Item { onDataChanged: (data) => { // Notice the "(data) =>" arrow function expression if (someCondition) console.log("function called") doSomethingElse() } }
However, the signal handler written in the following format passes the formatter.
import QtQuick Item { onDataChanged: function (data) { if (someCondition) console.log("condition matched") doSomethingElseWithData(data) } }