Bug 324713 - When sorting files by "Size", the name is used as a fallback for sorting files with equal size, but refreshing the KFileItems does not cause a resorting
Summary: When sorting files by "Size", the name is used as a fallback for sorting file...
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: view-engine: general (show other bugs)
Version: 4.11.1
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-09 19:35 UTC by Frank Reininghaus
Modified: 2013-09-09 19:42 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 4.11.2


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Reininghaus 2013-09-09 19:35:41 UTC
This issue is similar to bug 323518. There are still problems when the file's name is changed via the dir lister's refreshItems signal (this happens, e.g., when renaming with the dialog, or when the view is split, and the file is updated after it has been renamed in the other view).

Reproducible: Always

Steps to Reproduce:
1. mkdir test && cd test && touch a b c && dolphin .
2. Sort by size -> the order of the items is "a b c" because the name is used as a fallback (all files have zero size).
3. Rename "a" -> "d", either using the dialog (disable "Rename inline" in the settings), and/or split the view and rename in one of them.



Patch is ready:

https://git.reviewboard.kde.org/r/112561/
Comment 1 Frank Reininghaus 2013-09-09 19:42:16 UTC
Git commit be391bdac1901ef6a959c9d4e795b76be9c2b49d by Frank Reininghaus.
Committed on 09/09/2013 at 19:38.
Pushed by freininghaus into branch 'KDE/4.11'.

Always sort items correctly when the refreshItems() signal is received

When sorting by, e.g., "Size", and the name is used as a fallback
because there are multiple files with the same size, the refreshItems
signal that is received when a file's name is changed either with the
dialog or outside the current view did not cause the view to be resorted
after commit d70a4811807776966c3241a72121242f4d1eaee8. This patch fixes
it.
FIXED-IN: 4.11.2
REVIEW: 112561

M  +54   -32   dolphin/src/kitemviews/kfileitemmodel.cpp
M  +7    -0    dolphin/src/kitemviews/kfileitemmodel.h
M  +12   -0    dolphin/src/tests/kfileitemmodeltest.cpp

http://commits.kde.org/kde-baseapps/be391bdac1901ef6a959c9d4e795b76be9c2b49d