Bug 457331

Summary: When renaming fails, Dolphin shows the new filename until refreshed
Product: [Applications] dolphin Reporter: Kishore Gopalakrishnan <kishore96>
Component: view-engine: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: REPORTED ---    
Severity: normal CC: kfm-devel
Priority: NOR    
Version: 22.07.80   
Target Milestone: ---   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Kishore Gopalakrishnan 2022-07-31 06:47:28 UTC
SUMMARY
If you try to rename a file with a very long name, Dolphin shows an error message saying the rename failed. Nevertheless, the name of the file is still updated in the view, and the wrong name persists until the view is refreshed.

STEPS TO REPRODUCE
1. Press F2 to rename a file
2. Paste a very long name (e.g. `Paxton, Smolec, Schwab, Gautschy, Bildsten, Cantiello, Dotter, Farmer, Goldberg, Jermyn, Kanbur, Marchant, Thoul, Townsend, Wolf, Zhang, Timmes 2019 - Modules for Experiments in Stellar Astrophysics (MESA): Pulsating Variable Stars, Rotation, Convective Boundaries, and Energy Conservation.pdf`
3. Press enter
4. Dismiss the error window (that says renaming failed)

OBSERVED RESULTS
Once the error window is dismissed, the file in the view is shown with the new name (even though rename failed). However, refreshing the view (F5) correctly shows the file with the old name.

EXPECTED RESULTS
If renaming a file fails, the file should be shown with the old name even without refreshing the view.

SOFTWARE VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.25.3
KDE Frameworks Version: 5.96.0
Qt Version: 5.15.5
Kernel Version: 5.18.15-arch1-1 (64-bit)
Graphics Platform: X11

ADDITIONAL INFORMATION
A. Seems related to (may be a duplicate of) bug 399823.
B. Happens in both details view and icons view.