Details
-
Bug
-
Resolution: Fixed
-
Not Evaluated
-
Qt Creator 14.0.2, Qt Creator 15.0.0
-
Ubuntu 22.04 LTS
-
fba00d6e5 (16.0)
Description
- Have a simple condition:
int a = 0; int b = 0; if (a) b = 1; else b = 0;
- Place the cursor in the line starting with "if" and trigger quick fixes (Alt+Enter).
Creator shows "Add curly braces". - Press Enter to apply that fix.
Actual: Curly braces are added around the else-branch only. If there is no else-branch, Creator doesn't even offer this quick fix.
Expected: Curly braces are also added to the first conditional branch.