Bug 296437 - Dolphin: wrong sorting of files and folders in expanded details view
Summary: Dolphin: wrong sorting of files and folders in expanded details view
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: view-engine: details mode (show other bugs)
Version: 16.12.2
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Peter Penz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-20 14:48 UTC by oscar.0
Modified: 2012-03-20 22:36 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 4.8.2
Sentry Crash Report:


Attachments
inaccurate representation of tree structure (32.29 KB, image/png)
2012-03-20 14:50 UTC, oscar.0
Details

Note You need to log in before you can comment on or make changes to this bug.
Description oscar.0 2012-03-20 14:48:37 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20100101 Firefox/11.0
Build Identifier: 

In expanded details view, the tree structure is not shown properly under certain conditions.

Reproducible: Always

Steps to Reproduce:
1. Create new directory, e.g. /tmp/test; cd /tmp/test
2. Create a few directories and files: mkdir -p 1/b; mkdir -p 2/b; touch 1/b/c.txt; touch 2/a.txt; touch 2/b/c.txt
3. dolphin /tmp/test; change to details view; expand folders
Actual Results:  
File 2/b/c.txt is shown under 2

Expected Results:  
File 2/b/c.txt should be shown under 2/b; cf. 1/b/c.txt for expected behaviour
Comment 1 oscar.0 2012-03-20 14:50:17 UTC
Created attachment 69763 [details]
inaccurate representation of tree structure
Comment 2 oscar.0 2012-03-20 14:56:21 UTC
error appeared after update from KDE 4.7 to 4.8.1
Comment 3 Peter Penz 2012-03-20 15:05:17 UTC
Thanks for the report, but I cannot reproduce the issue with 4.8.1. There has been a sorting issue in Dolphin from KDE 4.8.0 - are you sure you have the 4.8.1 packages and not 4.8.0 (also from Dolphin)?
Comment 4 oscar.0 2012-03-20 20:05:56 UTC
(In reply to comment #3)
> Thanks for the report, but I cannot reproduce the issue with 4.8.1. There
> has been a sorting issue in Dolphin from KDE 4.8.0 - are you sure you have
> the 4.8.1 packages and not 4.8.0 (also from Dolphin)?

"rpm -q -f /usr/bin/dolphin" gives me "kde-baseapps-4.8.1-1.fc16.x86_64"
Comment 5 Peter Penz 2012-03-20 20:23:16 UTC
After trying a lot of things I could reproduce the issue: It seems you have disabled the "[ ] Folders First" setting - at least when disabling it I can reproduce the problem. Please let us know if this is really the case... Thanks!
Comment 6 oscar.0 2012-03-20 21:15:45 UTC
(In reply to comment #5)

Thank you very much for investigating the issue so quickly.

> After trying a lot of things I could reproduce the issue: It seems you have
> disabled the "[ ] Folders First" setting - at least when disabling it I can
> reproduce the problem. Please let us know if this is really the case...
> Thanks!

Yes, this is the case.
Comment 7 Peter Penz 2012-03-20 22:35:21 UTC
Git commit 7120e0166dc886e0a7fcbe03b8b5fb46137b5e75 by Peter Penz.
Committed on 20/03/2012 at 23:28.
Pushed by ppenz into branch 'KDE/4.8'.

Fix sorting-issue when "Sort folders first" is disabled

The comparison of expanded trees may not assume that directories
are always sorted first and must respect the "Sort folders first"
setting.

The sorting-unittest has been extended by a sub-tree and the usecase
of bug 296437. The already deactivated test for
KFileItemModel::expandedParentsCountCompare() has been completely removed
as it has been replaced by testSorting().
FIXED-IN: 4.8.2

M  +6    -4    dolphin/src/kitemviews/kfileitemmodel.cpp
M  +45   -59   dolphin/src/tests/kfileitemmodeltest.cpp

http://commits.kde.org/kde-baseapps/7120e0166dc886e0a7fcbe03b8b5fb46137b5e75
Comment 8 Peter Penz 2012-03-20 22:36:07 UTC
Git commit 1b0b0d181d47bf2445ab55a48cc07e0ba39f689d by Peter Penz.
Committed on 20/03/2012 at 23:28.
Pushed by ppenz into branch 'master'.

Fix sorting-issue when "Sort folders first" is disabled

The comparison of expanded trees may not assume that directories
are always sorted first and must respect the "Sort folders first"
setting.

The sorting-unittest has been extended by a sub-tree and the usecase
of bug 296437. The already deactivated test for
KFileItemModel::expandedParentsCountCompare() has been completely removed
as it has been replaced by testSorting().
FIXED-IN: 4.8.2

M  +6    -4    dolphin/src/kitemviews/kfileitemmodel.cpp
M  +45   -59   dolphin/src/tests/kfileitemmodeltest.cpp

http://commits.kde.org/kde-baseapps/1b0b0d181d47bf2445ab55a48cc07e0ba39f689d