Bug 499263 - braced initializers (c++) breaks code folding in UI
Summary: braced initializers (c++) breaks code folding in UI
Status: CLOSED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: UI: general (show other bugs)
Version: 5.10.221202
Platform: Debian stable Linux
: NOR minor
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-29 02:15 UTC by Cliff Kilby
Modified: 2025-02-03 20:32 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
showing the folding bug (12.56 KB, image/png)
2025-01-29 02:15 UTC, Cliff Kilby
Details
attachment-1791388-0.html (2.65 KB, text/html)
2025-02-03 20:32 UTC, Cliff Kilby
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cliff Kilby 2025-01-29 02:15:19 UTC
Created attachment 177781 [details]
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.
Comment 1 Igor Kushnir 2025-01-29 08:42:50 UTC
Cannot reproduce in KDevelop 6.1 or Kate 24.08.3. Looks like a bug in your old KTextEditor 5 or KSyntaxHighlighting 5 version. Must have been fixed by now.
Comment 2 Cliff Kilby 2025-01-30 14:51:22 UTC
Considering Plasma 5, and its related tools are not EOL according to KDE, I feel it is inappropriate to just close this as "resolved in later edition".
https://community.kde.org/Distributions
Comment 3 David Redondo 2025-01-30 14:53:47 UTC
Bus this kdevelop version is EOL.  As are these plasma and frameworks versions.
Comment 4 Cliff Kilby 2025-01-30 15:01:32 UTC
(In reply to David Redondo from comment #3)
> Bus this kdevelop version is EOL.  As are these plasma and frameworks
> versions.

https://kde.org/announcements/plasma/5/5.27.12/ No, no not according to KDE.
Comment 5 David Redondo 2025-01-30 15:14:36 UTC
You are running on .5 not .12

Plasma support has nothing to do if a kdevelop or frameworks version is supported. Mind you frameworks do not get point releases and 116 is the current  version. It was released in May last year and did not have many changes anymore.  I do not anticipate any other frameworks 5 release
Comment 6 Cliff Kilby 2025-02-03 10:58:42 UTC
(In reply to David Redondo from comment #5)
> You are running on .5 not .12
> 
> Plasma support has nothing to do if a kdevelop or frameworks version is
> supported. Mind you frameworks do not get point releases and 116 is the
> current  version. It was released in May last year and did not have many
> changes anymore.  I do not anticipate any other frameworks 5 release

It took some doing but I managed to force the unsupported but in testing 5.115.0 release into Debian 12.
This bug is still present. I do not have access to a 5.116 release without having to compile the entire plasma5 chain from scratch
I also reviewed all the changelogs between 103 as reported and 116 as you noted from KDE, 
https://kde.org/announcements/frameworks/5/
This bug wasn't addressed in any of the change notes.
I am under the impression it still exists in the plasma5 chain, and was fixed in the plasma6 release but not backported.
Comment 7 David Redondo 2025-02-03 12:06:28 UTC
Again frameworks support is entirely unrelated to plasma support
Comment 8 Akseli Lahtinen 2025-02-03 12:09:32 UTC
Thank you for your bug report!

Debian advises users to not submit bugs upstream (https://www.debian.org/Bugs/Reporting), as this version of the KDE software is out of support from KDE, and so it's possible that the bug exists only in Debian at this point.
Could you report the bug to Debian using the report bug utility (https://packages.debian.org/stable/utils/reportbug)? If necessary, the maintainer of the package will forward the bug upstream.

Thanks for understanding!
Comment 9 Cliff Kilby 2025-02-03 20:32:36 UTC
Created attachment 177937 [details]
attachment-1791388-0.html

Yeah, so my english isn't great but that said:
"If you file a bug in Debian, don't send a copy to the upstream software
maintainers yourself, as it is possible that the bug exists only in Debian.
If necessary, the maintainer of the package will forward the bug upstream."

I did not file the bug with Debian first as it appeared to have nothing to
do with the OS, or the packaging of the OS, or the repackaging of an
upstream component.

I will however, now report this bug to Debian, and not send a copy of that
bug report to KDE.


On Mon, Feb 3, 2025 at 12:09 PM Akseli Lahtinen <bugzilla_noreply@kde.org>
wrote:

> https://bugs.kde.org/show_bug.cgi?id=499263
>
> Akseli Lahtinen <akselmo@akselmo.dev> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>                  CC|                            |akselmo@akselmo.dev
>              Status|REOPENED                    |RESOLVED
>          Resolution|---                         |UNMAINTAINED
>
> --- Comment #8 from Akseli Lahtinen <akselmo@akselmo.dev> ---
> Thank you for your bug report!
>
> Debian advises users to not submit bugs upstream
> (https://www.debian.org/Bugs/Reporting), as this version of the KDE
> software is
> out of support from KDE, and so it's possible that the bug exists only in
> Debian at this point.
> Could you report the bug to Debian using the report bug utility
> (https://packages.debian.org/stable/utils/reportbug)? If necessary, the
> maintainer of the package will forward the bug upstream.
>
> Thanks for understanding!
>
> --
> You are receiving this mail because:
> You reported the bug.