Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
Qt Creator 5.0.0-beta1
-
None
-
c6ac773b9a2d6fc5cb581cd56785525d0a352a4a (qt-creator/qt-creator/5.0)
Description
It worked properly in 4.11 and many previous versions over the years. Yesterday, jumped straight to current beta, and stumbled on this.
template <typename ...Args> void some_foo(Args && ...args) { } int main() { int argument1 = 0; int argument2 = 0; int argument3 = 0; // Proper indentation. some_foo(argument1 // Auto-indents properly. , argument2 // Auto-indents properly. , argument3 ); // Bad indentation. some_foo(argument1 , "some str literal" , argument2 // At this point, auto-indent stops working. // Here it works again. , argument3 ); // Another example. some_foo("some str literal" "continuation" // At this point, auto-indent stops working. // Here it works again. , argument2 , argument3 ); // Another example: even a single comment line fixes auto-indent. some_foo("some str literal" // This comment line won't auto-indent // But this one will! "continuation" // Here it works again. , argument2 , argument3 ); // Another example: no issue. some_foo("some str literal", argument1 // Auto-indents properly. , argument2 , argument3 ); // Another example: no issue. some_foo("some str literal" // Even comment at the end of line stops the issue. // Auto-indents properly. , argument1 , argument2 , argument3 ); return 0; }
It seems that it only affects the line that immediately follows the literal. All following lines work as expected.
Please, help with solving this issue, because it's pretty counter-productive.
Attachments
Issue Links
- is duplicated by
-
QTCREATORBUG-26037 Auto indent on continuation line doesn't work consistently
- Closed