[Kde-pim] Re: Review Request: Include collections wich are watched in the ChangeRecorder in the EntityTreeModel

Christian Mollekopf chrigi_1 at fastmail.fm
Fri Jan 28 16:54:01 GMT 2011


> 
> First one I'd like to deal with is splitting the move into insert and
> remove. I attach patches to akonadi and kdepimlibs to make that
> happen. I use the same hack as is used to report item moves, but I
> don't know why the hack is there. Surely there should be a QByteArray
> NotificationMessage::destResource() const ? Maybe Volker can tell us
> something about that one.

Hi Steve,

The new resource of a collection on a move was actually set in the collection 
DataStore::moveCollection. Further the isMoveDestinationResourceMonitored 
return value was inverted.

All other changes are related to implicitly monitored collections.

Atm. all collections are monitored recursivly, but I could change that if 
needed, so you can also monitor a collection just for a single level.

The attached patches contain all changes, including the corrections from your 
patches. Do you see problems with this implementation?

One thing that I would like to add as well to the notifications, is the 
mimetype of the collection. We could do this either by adding the mimetype to 
the changes, or by adding them directly to the notification. However, we should 
check it afterwards in the monitor, and emit collectionRemoved/Added signals 
accordingly.

If we have that, I believe that we can remove all checks in the ETM if a 
collection/item should be included, because we will only get signals from 
items which are included,  and we also only fetch items based on the info from 
the monitor. Right?

Btw. why can't we modify the NotificationMessage to include the 
destinationResource properly (and later also the mimetype)?

Cheers,

Chris

> 
> As for the notifications in the case of subcollections of monitored
> collections, I think that should happen in ensureDataAvailable, not in
> the ETM.
> 
> All the best,
> 
> Steve.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: splitcollectionmove_chris.patch
Type: text/x-patch
Size: 12277 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20110128/4364edf9/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: notifyinterresourcemove_chris.patch
Type: text/x-patch
Size: 4979 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20110128/4364edf9/attachment-0001.bin>
-------------- next part --------------
_______________________________________________
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