Summary: | Renaming currently viewed folder in Folders sidebar doesn't update main area | ||
---|---|---|---|
Product: | [Applications] dolphin | Reporter: | karl.r.ernst |
Component: | panels: folders | Assignee: | Dolphin Bug Assignee <dolphin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | emmanuelpescosta099, faure, frank78ac |
Priority: | NOR | Keywords: | reproducible |
Version: | 2.0 | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kdelibs/8141788c819fa0bcfba7cfaca474095ca819a130 | Version Fixed In: | 4.9.5 |
Attachments: | Proposed KDirLister unit test |
Description
karl.r.ernst
2012-02-19 19:05:20 UTC
Thanks, I could reproduce the issue. Resetting assignee to default as per bug #305719 Review-request: https://git.reviewboard.kde.org/r/107070/ Created attachment 75453 [details]
Proposed KDirLister unit test
Emmanuel found out (see discussion in the review request) that the root cause of this bug is apparently that KDirLister::rootItem() does not return a KFileItem corresponding to the new view URL after the rename operation. This is a unit test for KDirLister which demonstrates this.
(In reply to comment #4) > Created attachment 75453 [details] > Proposed KDirLister unit test > > Emmanuel found out (see discussion in the review request) that the root > cause of this bug is apparently that KDirLister::rootItem() does not return > a KFileItem corresponding to the new view URL after the rename operation. > This is a unit test for KDirLister which demonstrates this. Any updates about KDirLister::rootItem() fix? I thought again about your earlier idea to use "m_model->fileItem(destUrl);" to determine the KFileItem for the drop target: https://git.reviewboard.kde.org/r/107070/diff/2/#index_header This will just make the destItem a null KFileItem if something is dropped in the empty space in the view (note that the KFileItemModel does actually not contain a KFileItem for its own URL). This means that the checks in QString DragAndDropHelper::dropUrls(const KFileItem& destItem, const KUrl& destUrl, QDropEvent* event) are circumvented and KonqOperations::doDrop is called directly. The problem is that you can then actually drop items in folders which you can't write to (you will get an error dialog from KIO), or you can drag a folder from the Folders Panel and drop it in itself (which fails silently). So I would prefer to have this fixed in KDirLister, or we have to find another kind of workaround. Git commit 8141788c819fa0bcfba7cfaca474095ca819a130 by David Faure. Committed on 21/12/2012 at 21:06. Pushed by dfaure into branch 'KDE/4.9'. Fix KDirLister's rootItem not being updated when renaming the directory. The root item kept having the old URL. Thanks to Emmanuel for the bug investigation, and to Frank for the unittest! FIXED-IN: 4.9.5 M +4 -1 kio/kio/kdirlister.cpp M +27 -0 kio/tests/kdirlistertest.cpp M +1 -0 kio/tests/kdirlistertest.h http://commits.kde.org/kdelibs/8141788c819fa0bcfba7cfaca474095ca819a130 |