There are multiple issues regarding the folding in QtCreator. Therefore a complete refactoring is necessary to solve the bugs and implement the suggestions regarding the code folding.
- relates to
- 
                    QTCREATORBUG-8078 Code folding bug when saving file -         
- Open
 
-         
- 
                    QTCREATORBUG-8230 Automatic unfold by moving cursor with the keyboard results in wrong cursor position -         
- Open
 
-         
- 
                    QTCREATORBUG-2028 collapse/expand disabled between #ifdefs that evaluate to false -           
- Closed
 
-         
- 
                    QTCREATORBUG-5234 Block folding/unfolding broken by coditional preprocessor blocks -           
- Closed
 
-         
- 
                    QTCREATORBUG-11449 Code folding confused by edits -           
- Closed
 
-         
- 
                    QTCREATORBUG-5110 Wrong folding of multi-line comment -         
- Closed
 
-         
- 
                    QTCREATORBUG-6604 QtCreator code folding bug -         
- Closed
 
-         
- 
                    QTCREATORBUG-5170 Code Folding -         
- Reported
 
-         
- 
                    QTCREATORBUG-2 Do code folding for preprocessor directives -         
- Open
 
-         
- 
                    QTCREATORBUG-8054 Make code folding hovers turn to dialog or similar on mouse over or click -         
- Open
 
-         
- 
                    QTCREATORBUG-1189 Initial default folding -         
- Open
 
-         
- 
                    QTCREATORBUG-11398 folding of "//"-style comment block -           
- Closed
 
-         
- 
                    QTCREATORBUG-9106 multilineComments and braces are merged and can not be collapsed individually -         
- Closed
 
-         
| For Gerrit Dashboard: QTCREATORBUG-7852 | ||||||
|---|---|---|---|---|---|---|
| # | Subject | Branch | Project | Status | CR | V | 
| 575821,4 | TextEditor: Add folding actions to the extra area context menu | master | qt-creator/qt-creator | Status: MERGED | +2 | +1 |