[Kde-pim] Review Request: Always connect to monitor item signals independent of initial fetch scope

Stephen Kelly steveire at gmail.com
Fri Jun 18 09:40:07 BST 2010


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

Ship it!


This patch is fine, but I don't think it solves the bigger problem.

I think though that once apps put a Monitor into an ETM they should not change the itemFetchScope. The ETM will not be notified about the change to the itemFetchScope. Then, surprisingly, items which are already in the model having been fetched with the empty itemFetchScope will not be re-fetched and will remain empty.

Instead ETM should get a setItemFetchScope method which looks something like 

ETM::setItemFetchScope(scope)
{
  beginResetModel();
  m_monitor->setItemFetchScope(scope)
  endResetModel();
}

Resetting it will cause the model to repopulate and refetch the items with the new itemFetchScope.

I'll try to do that and make sure it works next week, but if someone else wants to do it instead, feel free :)

- Stephen


On 2010-06-17 14:51:17, Kevin Krammer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/4368/
> -----------------------------------------------------------
> 
> (Updated 2010-06-17 14:51:17)
> 
> 
> Review request for KDE PIM and Stephen Kelly.
> 
> 
> Summary
> -------
> 
> The item fetch scope could be set after the ETM's contructor has been executed, e.g. ChangeRecorder being created in a base class and derived classes setting fetch scope depending on data type.
> 
> If item monitoring should really be switched off, this can be done explicitly using setItemPopulationStrategy( NoItemPopulation )
> 
> If ItemFetchScope stays empty, all items will of course only have the data which is part of the notifications, e.g. id, remoteId, mimeType
> But then that's what the fetch scope is for
> 
> 
> Diffs
> -----
> 
>   /trunk/KDE/kdepimlibs/akonadi/entitytreemodel_p.cpp 1139172 
> 
> Diff: http://reviewboard.kde.org/r/4368/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Kevin
> 
>

_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list