Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
Qt Creator 4.4.0
-
None
-
Windows 7 x64, -Clang Code Model-
-
0bac3ad279450d6a19093e0d58036774cc66c7ca (qt-creator/qt-creator/master)
Description
Not sure it is related to the Clang Code Model, but I remember that in former versions the closing curly brace was inserted on Enter after an opening curly brace.
Now typing an opening curly brace automatically inserts the closing one.
This is especially annoying when you refactor code like the following:
bool result = f(); if (!result) { // error handling }
to
if (!f()) { // error handling }
because when editing the following occurs:
if (!f()) {} // editing this line inserts an unneeded closing brace if (!result) { // This line will be removed // error handling }
Attachments
Issue Links
- is duplicated by
-
QTCREATORBUG-19095 [REG 4.3 -> 4.4] Closing bracket is added automatically after if/for/while
-
- Closed
-
- relates to
-
QTCREATORBUG-20052 Support more intelligent {
-
- Closed
-
For Gerrit Dashboard: QTCREATORBUG-18872 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
219060,3 | C++: Do not auto-insert '}' after class/struct/enum/union | master | qt-creator/qt-creator | Status: MERGED | +2 | 0 |
262850,2 | C++: Do not auto-insert '}' after control flow constructs | master | qt-creator/qt-creator | Status: MERGED | +2 | 0 |