Details
-
Bug
-
Resolution: Done
-
P4: Low
-
5.15.1
-
61417ad3525d33c41e7d8423103e876a922d5f8b (qt/qtdeclarative/dev)
Description
Hi,
qmlformat does this :
a = () => updateDB(params) //becomes a = () => { return updateDB(params); };
Arrow functions are cool to write small inline code so adding the braces for small expression adds two more line of code (total 3 instead of one) and is less readable than a oneliner. As a consequence `return` is added even for oneline which is useless.
Attachments
For Gerrit Dashboard: QTBUG-87179 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
316560,3 | qmlformat: Make arrow functions one liners | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |