SUMMARY When items are shown in the "Files > Open Recent" or "Bookmarks" menus, said items will appear without their underscores, be it in the file names, or line of code. STEPS TO REPRODUCE 1. Open a file in a program that uses KTextEditor (Kate, KDevelop, etc). 2. Bookmark any line, or close the file. 3. Either check the "File > Open Recent" or the "Bookmarks" menu in the top bar. OBSERVED RESULT File names and lines of code appearing without their underscores. EXPECTED RESULT The opposite. SOFTWARE/OS VERSIONS KDE Plasma Version: 5.16.4 KDE Frameworks Version: 5.60 Qt Version: 5.13
Wild guess: are we missing to attach the KAccelManager to add shortcuts?
For me, that works. I can see the auto-added accel _ if I press ALT and text that contains _ is rendered with _ in the menu, too. Just to clarify: Do you have issues that e.g. for some line like lala_lala The _ is not shown in the menu? If yes, could you try to vary your global font size/scaling factor if that helps?
It can be the size/scaling, as "lala_lala" is not just rendered as "lala lala", but as "lalalala".
Hmm, interesting, that works perfectly fine here with 19.08 for both bookmarks and files. KDE Frameworks 5.60.0 Qt 5.13.0 (built against 5.13.0) The xcb windowing system
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone!
I really don't know what else I could provide for information...
Please add a screenshot of a wrongly rendered menu. It could be a Breeze or Qt issue.
Created attachment 122560 [details] Screenshot of KDevelop Done. The files who aren't in PascalCase should have been written in snake_case.
Is this actually the Breeze widget style? From the rounding of the menubar highlight, it looks like you are using a different widget style.
Yes, it is.
This talk about widgets made me realize something, the bug is actually in the global menu widget! Accessing those from the actual menu bars show the underscores correctly.
Which section should I go to report a bug in a plasma widget?
Thanks for the investigation! Reassigning to Global Menu component.
I can reproduce this in Plasma 5.26.1. It's not the latest version, which I can't use much right now, but it's not likely that things have changed much in 5.27. The issue is likely caused by the following code. In plasma-workspace/libdbusmenuqt/dbusmenuimporter.cpp, DBusMenuImporterPrivate: ``` void updateActionLabel(QAction *action, const QVariant &value) { QString text = swapMnemonicChar(value.toString(), '_', '&'); action->setText(text); } ``` `swapMnemonicChar()` is defined in plasma-workspace/libdbusmenuqt/utils.cpp and probably needs to "escape" the characters it is meant to swap.