STEPS TO REPRODUCE 1. Select a file. 2. Press F2. 3. Enter a very long file name (longer than 255 chars) OBSERVED RESULT No error message EXPECTED RESULT Dolphin tells me that renaming failed. SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 6.0.80 KDE Frameworks Version: 6.0.0 Qt Version: 6.6.2 Kernel Version: 6.7.5-arch1-1 (64-bit) Graphics Platform: Wayland Processors: 12 × AMD Ryzen 5 5600H with Radeon Graphics Memory: 13.5 GiB of RAM Graphics Processor: AMD Radeon Graphics
CC: https://invent.kde.org/frameworks/kio/-/merge_requests/1551
Humm I get the error message on source build of dolphin, btrfs, arch linux. However after the error message is shown the displayed name incorrectly shows the new name, instead of the old name.
(In reply to fanzhuyifan from comment #2) > Humm I get the error message on source build of dolphin, btrfs, arch linux. > However after the error message is shown the displayed name incorrectly > shows the new name, instead of the old name. I've seen that, too. Try to create a file "a", and rename it to "012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" (300 chars). No errors on master.
A possibly relevant merge request was started @ https://invent.kde.org/system/dolphin/-/merge_requests/838
Git commit c5238c9946805c8aef69f4b52689ba5a700c913e by Jin Liu. Committed on 11/10/2024 at 11:43. Pushed by meven into branch 'master'. dolphinview: add error message when renaming failed in dialog mode M +3 -0 src/views/dolphinview.cpp https://invent.kde.org/system/dolphin/-/commit/c5238c9946805c8aef69f4b52689ba5a700c913e
Git commit 829e0eb912a5681d5c6fddfd461165ae9f5cb093 by Jin Liu. Committed on 12/10/2024 at 13:17. Pushed by meven into branch 'master'. KFileItemModel: fix `setData` in the renaming usage The `setData` function is used by inline renaming to update the `text` role (i.e. file name) in the model before actually do the renaming. However, the current implementation only updates `text` and url in KFileItem in this case, leaving the `url` role and the `m_items` cache untouched. This makes the cache incoherent, so `index()` won't find the renamed item. It also makes the `url` role incoherent with the `text` role. This also fixes the problem mentioned in bug #481561 where when inline renaming fails, it still shows the new name. (Because `m_model->index` fails to find the new name and rename it back on job failure.) M +8 -1 src/kitemviews/kfileitemmodel.cpp https://invent.kde.org/system/dolphin/-/commit/829e0eb912a5681d5c6fddfd461165ae9f5cb093