Bug 303873 - dolphin scrambles files and folders needlessly before sorting them correctly
Summary: dolphin scrambles files and folders needlessly before sorting them correctly
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: view-engine: general (show other bugs)
Version: 2.0
Platform: Debian testing Linux
: NOR minor
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-21 02:30 UTC by gustavo
Modified: 2013-08-24 16:14 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.11.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gustavo 2012-07-21 02:30:00 UTC
Upon entering a folder, Dolphin presents the icons correctly sorted. Then, in about half a second, it will scramble them all and then, after some time, will sort them correctly again, this time for good. The more folders/files are being displayed, the longer Dolphin leaves them jumbled. This will only happen once per folder per user session, meaning once you've given Dolphin time to sort the contents of a folder properly, that folder will not trigger the bug again before you log out.

Reproducible: Always

Steps to Reproduce:
1. Start a fresh session.
2. Open Dolphin.
3. Open a folder with lots of files and folders. /etc will probably do nicely.
Actual Results:  
The aforementioned correct presentation followed by a needless garbled sorting, then a delayed correction.

Expected Results:  
The correct presentation and no fuss.
Comment 1 Janek Bevendorff 2012-07-21 09:35:55 UTC
I can't confirm in Dolphin 2.1 and I also can't remember this to occur in 2.0.
Which KDE version are you using?
Comment 2 Christoph Feck 2012-07-21 11:01:14 UTC
This is probably with "Sort by Type" mode, which got improved a bit in Dolphin 2.1.
Comment 3 gustavo 2012-07-21 13:41:20 UTC
I'm using KDE 4.8.4. And I do use "sort by type".
Comment 4 Frank Reininghaus 2012-08-07 16:01:35 UTC
Thanks for the bug report! I can't reproduce in master with "Sort by type".
Comment 5 Christoph Feck 2012-08-07 17:31:36 UTC
Here, it still initiates a re-sort, whenever the directory notification signal is sent (i.e. whenever a file is modified on the file system). If you have a background process doing work (e.g. I am compiling, and there are always changes in /tmp), then Dolphin will re-sort many times when opening a folder, even if that folder is not "/tmp".
Comment 6 Jeroen van Meeuwen (Kolab Systems) 2012-08-24 16:18:36 UTC
Resetting assignee to default as per bug #305719
Comment 7 Emmanuel Pescosta 2013-06-23 13:05:55 UTC
Git commit 735c046ddac45f729e52dda38f7152b62c304bb3 by Frank Reininghaus. 
Committed on 18/06/2013 at 17:39. 
Pushed by freininghaus into branch 'KDE/4.10'. 

Ensure that the "Sort by Type" setting is respected 

Before this commit, switching from, e.g., "Sort by Name" to "Sort by 
Type" sometimes had no effect until the view was refreshed. The problem 
was that the re-sorting was triggered before the type information was 
actually added to the model. 
Related: bug 312014 
FIXED-IN: 4.10.5 
REVIEW: 111004 

M +3 -3 dolphin/src/kitemviews/kfileitemmodel.cpp 
M +42 -1 dolphin/src/tests/kfileitemmodeltest.cpp 

http://commits.kde.org/kde-baseapps/735c046ddac45f729e52dda38f7152b62c304bb3
Comment 8 Emmanuel Pescosta 2013-06-23 13:07:44 UTC
Git commit d70a4811807776966c3241a72121242f4d1eaee8 by Emmanuel Pescosta. 
Committed on 20/06/2013 at 17:16. 
Pushed by emmanuelp into branch 'master'. 

Avoid a unnecessary resorting when items are changed, only resort the items when the sorting role value is changed. 
FIXED-IN: 4.11 
REVIEW: 111146 

M +12 -5 dolphin/src/kitemviews/kfileitemmodel.cpp 

http://commits.kde.org/kde-baseapps/d70a4811807776966c3241a72121242f4d1eaee8
Comment 9 Emmanuel Pescosta 2013-08-24 16:14:59 UTC
Git commit 9cbca7241f55da4c77d037dba39c36403b9c762b by Emmanuel Pescosta.
Committed on 24/08/2013 at 16:13.
Pushed by emmanuelp into branch 'KDE/4.11'.

Make use of the "resort all items timer" in KFileItemModel::slotRefreshItems
to avoid too much expensive resorting calls, in case of many refresh items signals.

Followup to patch 111146
Related: bug 323789, bug 299565
FIXED-IN: 4.11.1
REVIEW: 111195

M  +1    -1    dolphin/src/kitemviews/kfileitemmodel.cpp

http://commits.kde.org/kde-baseapps/9cbca7241f55da4c77d037dba39c36403b9c762b