Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
Qt Creator 3.6.1
-
None
-
Windows 7 64 bit
Description
- Go to "Tools" -> "Options..." -> "C++" -> "Code Style".
- Click "Edit" and go to the "Braces" tab.
In the code example you'll see something like:if (a > 10) { int b = 2 * a; return a * b; }
Note that the opening brace is on a new line.
- Open a source file with the following code:
if (1 && 2) return;
- Move the cursor into the condition and press Alt+Enter.
- Select the quick fix "Split if Statement" and press Enter.
Creator will replace the code with:if (1) { if (2) return; }
Here, the opening brace is on the same line as the condition.
Code generated by Creator and the Code Style example should have the same style.