Summary: | Newly moved files are not displayed under their respective folders in Dolphin's details view under certain conditions | ||
---|---|---|---|
Product: | [Applications] dolphin | Reporter: | Alexander Kandaurov <aakandaurov> |
Component: | view-engine: details mode | Assignee: | Dolphin Bug Assignee <dolphin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | emmanuelpescosta099 |
Priority: | NOR | Keywords: | investigated |
Version: | 2.0.95 | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kde-baseapps/a79c3a391c278f58cd5ec69e56cfb3b6dec9ea17 | Version Fixed In: | 4.10.4 |
Sentry Crash Report: | |||
Attachments: | Patch |
Description
Alexander Kandaurov
2012-05-09 08:05:57 UTC
Resetting assignee to default as per bug #305719 I can't reproduce this bug in Dolphin 2.2 / KDE 4.10.1 I can't reproduce steps 1–3 with the latest version, but steps 4–7 are still reproducible. Created attachment 79627 [details]
Patch
The problem is that KFileItemModel::slotRefreshItems() resets the data using retrieveData(), which sets "isExpanded" to false.
My proposed patch fixes this by not setting this role explicitly in retrieveData() and simply assuming that its value is false if it does not exist.
I'll work on a unit test before committing this though. It would be a shame to see this subtle bug reappear at some point. Git commit a79c3a391c278f58cd5ec69e56cfb3b6dec9ea17 by Frank Reininghaus. Committed on 22/05/2013 at 18:14. Pushed by freininghaus into branch 'KDE/4.10'. Do not reset the 'isExpanded' state when an expanded folder is refreshed If an item is moved out of an expanded folder, the model receives the dir lister's refreshItems signal for the folder. The method retrieveData() then updates the folder's properties. This commit makes sure that the 'isExpanded' state is not touched by retrieveData(). A side-effect is that the 'isExpanded' role is not initialized to 'false', but this does not matter because trying to read a non-existing role from the QHash<QByteArray, QVariant> yields a default-constructed QVariant, which evaluates to 'false'. FIXED-IN: 4.10.4 REVIEW: 110401 M +0 -4 dolphin/src/kitemviews/kfileitemmodel.cpp M +34 -0 dolphin/src/tests/kfileitemmodeltest.cpp http://commits.kde.org/kde-baseapps/a79c3a391c278f58cd5ec69e56cfb3b6dec9ea17 |