Summary: | No error message when renaming fails | ||
---|---|---|---|
Product: | [Applications] dolphin | Reporter: | Jin Liu <ad.liu.jin> |
Component: | general | Assignee: | Dolphin Bug Assignee <dolphin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | fanzhuyifan, kfm-devel |
Priority: | NOR | Keywords: | qt6 |
Version First Reported In: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/system/dolphin/-/commit/829e0eb912a5681d5c6fddfd461165ae9f5cb093 | Version Fixed In: | |
Sentry Crash Report: |
Description
Jin Liu
2024-02-20 01:04:06 UTC
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 |