Bug 491684

Summary: Ampersands (&) in filename missing in "Actions for" button
Product: [Applications] dolphin Reporter: John Veness <john.kde>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: felixernst, kfm-devel
Priority: NOR    
Version: 24.05.2   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In: 24.12
Sentry Crash Report:

Description John Veness 2024-08-13 19:54:23 UTC
SUMMARY
If you add the "Actions for" button to the toolbar, filenames that contain "&" will not appear correctly in that button.

STEPS TO REPRODUCE
1. Run Dolphin
2. Configure Toolbars
3. Add the "Actions for..." button to the toolbar
4. Click on a file or folder with an ampersand in the name, e.g. "Night & Day"

OBSERVED RESULT
Button text says:

   Actions for "Night  Day"

EXPECTED RESULT
Button text says:

   Actions for "Night & Day"

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20240811
KDE Plasma Version: 6.1.4
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2
Kernel Version: 6.10.3-1-default (64-bit)
Graphics Platform: X11
Comment 1 Bug Janitor Service 2024-08-13 20:06:46 UTC
A possibly relevant merge request was started @ https://invent.kde.org/system/dolphin/-/merge_requests/812
Comment 2 Méven 2024-09-19 07:29:01 UTC
Git commit 0fb46289425d145d0236a638d2478592cda45810 by Méven Car, on behalf of John Veness.
Committed on 19/09/2024 at 07:28.
Pushed by meven into branch 'release/24.08'.

Fix display of filename ampersands in actions

If you added the "Actions for..." button to the toolbar, filenames that contain "&" would not appear correctly in that button. This MR fixes that, and also the button that appears when using "Delete" with selection mode.

(cherry picked from commit 68f1401ecf232ccdca54362d032a547b1ec5f48a)

Co-authored-by: John Veness <john.kde@pelago.org.uk>

M  +14   -14   src/kitemviews/kfileitemlisttostring.cpp

https://invent.kde.org/system/dolphin/-/commit/0fb46289425d145d0236a638d2478592cda45810