Details
-
Bug
-
Resolution: Cannot Reproduce
-
Not Evaluated
-
Qt Creator 4.9.1
-
None
Description
When selecting Tools>Options>Qt Quick>QML/JS Editing>Enable auto format on file save feature, some parts of codes in Javascript functions are removed after saving a changed file. For example if you have a function with more than one argument like:
function test(p1, p2) {
console.log("Hello")
}
After saving the changes it changes in to:
function test(p1p2) {
console.log("Hello")
}
Another example is this function :
function test() { for(var i=0;i<10;i++) console.log(i) }
After saving it is changed to:
function test() {
for (; i < 10; i++)
console.log(i)
}
Also default values for function parameters are removed after saving.
For example this function :
function test(p = 1) {
console.log("hello")
}
is changed to:
function test(p) {
console.log("hello")
}
I didn't see these problems on Qt Creator 4.8.
Attachments
Issue Links
- relates to
-
QTCREATORBUG-20669 QML/JS Editor removes semicolons when reformatting
- Reported