Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
Qt Creator 4.9.2
-
macos
Description
I have a .qml file that has several for loops.
IE:
for (var i = 0; i < days.length; i++) {
if (currentDay === days[i]) {
logger.info(mediaMsg(media, "matched day " + currentDay));
return true;
}
}
When I select Tools->QML/JS->Reformat File it does this:
notice that the var i = 0 is missing in the for statement and the semi colon is missing at the end of the logger.info line and return true line
for (; i < days.length; i++) {
if (currentDay === days[i]) {
logger.info(mediaMsg(media, "matched day " + currentDay))
return true
}
}
Is there something I am missing ?
If I reformat then it gives error of undefined variable i.