https://bugs.kde.org/show_bug.cgi?id=499263

            Bug ID: 499263
           Summary: braced initializers (c++) breaks code folding in UI
    Classification: Applications
           Product: kdevelop
           Version: 5.10.221202
          Platform: Debian stable
                OS: Linux
            Status: REPORTED
          Severity: minor
          Priority: NOR
         Component: UI: general
          Assignee: kdevelop-bugs-n...@kde.org
          Reporter: cliffjki...@gmail.com
  Target Milestone: ---

Created attachment 177781
  --> https://bugs.kde.org/attachment.cgi?id=177781&action=edit
showing the folding bug

Using a braced initializer in kdevelop breaks code folding.
EXAMPLE CODE TO REPRODUCE
void testfunc(){
        //comment
        std::ifstream file{"ooh.a.file", std::ios::binary | std::ios::in};
        //comment
        //code body
}
int main(){
//comment
}

OBSERVED RESULT
Code fold point appears at "void testfunc" AND at "std::ifstream". The one at
"std::ifstream" folds the whole function, the one at "void testfunc" folds to
the end of the file.

EXPECTED RESULT
Code fold point appears at "void testfunc" only and folds the whole function.

SOFTWARE/OS VERSIONS
Linux: 6.1.0-30
KDE Plasma Version: 5.27.5 
KDE Frameworks Version:  5.103.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
Workaround available.
Adding a space at the end of the brace initializer like:
std::ifstream file{"ooh.a.file", std::ios::binary | std::ios::in };
Puts the expected code fold point back.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to