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

Emmanuel Pescosta emmanuelpescosta099 at gmail.com
Sat Mar 16 13:06:13 GMT 2013



> On March 16, 2013, 10:53 a.m., Frank Reininghaus wrote:
> > 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.

Thanks for testing! :)

> I can still reproduce the bug
Hmm, ok. Very strange
It works fine for me (34 different type groups -> 36 folders + 100 files) - Can you please tell me your setup?

> and the unit test still fails
All unit tests work in master ;) Maybe we should make this a master-only fix?

> Idea how to fix this
Ok thanks! I will try it during the night duty or maybe tomorrow (depends on the number of deployments of emergency services)


- Emmanuel


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


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/72f88ebe/attachment.htm>


More information about the kfm-devel mailing list