Bug 253054

Summary: Akonadi clients don't show nested resources when no matching top level resources are present
Product: [Frameworks and Libraries] Akonadi Reporter: Peter Grasch <me>
Component: generalAssignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Peter Grasch 2010-10-02 20:46:52 UTC
Version:           CVS (using Devel) 
OS:                Linux

Akonadi applications display collections based on their mimetype. For example the KAddressbook only displays collections containing contacts and distribution lists. KOrganizer looks for events and todos.

The filtering is done by akonadi but there is a bug: The filtering works only if the collection in question is a top level collection or there is at least one top level collection with the correct mimetype.

With e.g. the groupdav resource this is not the case.

Configuration Examples:
1. Only iCal resource loaded
Resources: iCal
Works

2. Only groupdav resource loaded:
Resources: groupdav/calendar
Doesn't work

3. Groupdav and iCal resource loaded:
Resources: groupdav/calendar, iCal
Works.

Reproducible: Always

Steps to Reproduce:
Add a resource that provides non top-level collection with a matching mimetype and make sure it is the only one that matches. Then try to list this mimetype with the EntityTreeView.
For example: Set up the groupdav resource, make sure it is the only one providing contacts and open KAddressbook - it will be totally empty.

Actual Results:  
Empty model.

Expected Results:  
Model containing the groupdav resource.

I wrote a workaround and will upload it to the reviewboard after this bug report.
Comment 1 Stephen Kelly 2010-10-22 14:04:10 UTC
SVN commit 1188436 by skelly:

Make sure a recursive listing is done even if a first level listing returns no items.

BUG: 253054

 M  +1 -0      entitytreemodel.h  
 M  +13 -4     entitytreemodel_p.cpp  
 M  +1 -0      entitytreemodel_p.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1188436