Review Request 109471: Fix Bug 312014 - testing: group by file does not work correctly

Frank Reininghaus frank78ac at googlemail.com
Sat Mar 16 10:53:01 GMT 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/109471/#review29308
-----------------------------------------------------------


Thanks Emmanuel, but even with your new patch, I can still reproduce the bug, and the unit test still fails.

I think the problem is the following: when the folder is loaded, and the "Type" is neither shown nor used as the sort role, retrieveData() does not set the "TypeRole". If we then switch to "Sort by Type", that role is still empty, i.e., all items look like they have the same type, which is why the fallback sorting by "Name" is used.

Idea how to fix this: in KFileItemModel::onSortRoleChanged(), if the new sort role is "Type", try to determine the mime types synchronously for 200 ms *before* the resorting, and makes sure that KFileItemModelRolesUpdater does the rest asynchronously.

- Frank Reininghaus


On March 15, 2013, 2:53 p.m., Emmanuel Pescosta wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/109471/
> -----------------------------------------------------------
> 
> (Updated March 15, 2013, 2:53 p.m.)
> 
> 
> Review request for Dolphin and Frank Reininghaus.
> 
> 
> Description
> -------
> 
> Fix wrong grouping of files (Esp. when sorting by file type)
> 
> Changes needed for master:
> Add "const ItemData* parent = itemData->parent;" to retrieveData and remove the parent parameter from retrieveData.
> 
> Ideas for master:
> Maybe use "void QtConcurrent::blockingMap ( Iterator begin, Iterator end, MapFunction function )" instead of a simple loop in setRoles, slotRefreshItems and createItemDataList.
> 
> 
> This addresses bug 312014.
>     http://bugs.kde.org/show_bug.cgi?id=312014
> 
> 
> Diffs
> -----
> 
>   dolphin/src/kitemviews/kfileitemmodel.h ef9dc98 
>   dolphin/src/kitemviews/kfileitemmodel.cpp 7927245 
> 
> Diff: http://git.reviewboard.kde.org/r/109471/diff/
> 
> 
> Testing
> -------
> 
> Works for me.
> 
> Open a folder -> Sort by Type -> Sort by Rating -> Sort by .... -> Finally: Sort by Type (Files should be in the right file-type group)
> 
> 
> Thanks,
> 
> Emmanuel Pescosta
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20130316/8b20d149/attachment.htm>


More information about the kfm-devel mailing list