SUMMARY *** NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols. See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports *** STEPS TO REPRODUCE 1. Install pycharm 2. Clone a git project with a hyphen in its name (e.g. https://github.com/canonical/craft-cli) 3. Open the project in pycharm OBSERVED RESULT Window title in the icons-only task manager calls the window "craft" EXPECTED RESULT Window title should be "craft-cli — [filename]" SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: Kubuntu 23.10 (available in About System) KDE Plasma Version: 5.27.8 KDE Frameworks Version: 5.27.8 Qt Version: 5.15.10 ADDITIONAL INFORMATION Using the "Detect Window Properties" item in System Settings's window rules segment shows the correct window title. This occurs both on Wayland on my laptop (running Kubuntu Mantic) and on xorg on my desktop (running KDE Neon)
Heh, we use the hyphen to cut of the app name, but it looks like we're inappropriately looking for the first one rather than the last one.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1861
(In reply to Nate Graham from comment #1) > Heh, we use the hyphen to cut of the app name, but it looks like we're > inappropriately looking for the first one rather than the last one. We do look for the last one, it's just that Pychar uses – instead of — or - (they're all different). I added that dash to the list and, just for sure, also checked for whitespace before it.
Git commit dbc0d28dd5adcf2cb36fe44fabef7ecdb7b1d52f by Niccolò Venerandi. Committed on 25/11/2023 at 13:23. Pushed by niccolove into branch 'master'. In Task Manager tooltips, only match dash if it follows a space Since some applications might have a project with a dash in the name, such as "python-Project", we only match "-" in the tooltip of Task Manager (to extract the project name) if there's a space before it. We also start tracking for –, which is a different type of dash compared to -. M +2 -2 applets/taskmanager/package/contents/ui/ToolTipInstance.qml https://invent.kde.org/plasma/plasma-desktop/-/commit/dbc0d28dd5adcf2cb36fe44fabef7ecdb7b1d52f