Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
Qt Creator 4.3.0
-
None
-
Qt: qt-opensource-linux-x64-5.9.0
Build host: Ubuntu 64bit
Description
Moving dot-separated properties to a new line breaks auto-indentation (Ctrl-i) of the "}" braces that follow this line.
1) Auto-indentation works fine without line breaks:
Window { Text { text: qsTr("%1").arg("text") } }
2) Auto-indentation is broken, when '.arg' is moved to the new line (for example, because
the line will be too long otherwise):
Window { Text { text: qsTr("%1: very long text here") .arg("very long text here too") } } // <-- after the auto-completion is applied, the last closing curly brace // is indented and is aligned horizontally with the previous closing // curly brace. Correct behavior should be: the last closing curly // brace is not indented.
3) Similarly, auto-indentation is also broken for other dot-separated properties:
Window {
Text {
text: font
.family
}
} // <-- same problem with the last closing curly brace.
4) A workaround to fix auto-completion (but will not work with the 'font.family'-like example above, e.g. something long like "currentFontOfSomeSpecialItem.familyWhichBelongsToTheSansGroup"):
Window { Text { text: qsTr("%1: very long text here").arg( "very long text here too") } }