[Kde-pim] Re: Review Request: Include collections wich are watched in the ChangeRecorder in the EntityTreeModel
Christian Mollekopf
chrigi_1 at fastmail.fm
Tue Feb 1 17:54:15 GMT 2011
Hi,
I made some progress on fixing the monitor+entitytreemodel.
notifyresource:
Set the destination collection during a move in the changed parts, set the
source resource correctly.
The only difference from steves patch is that the source resource is correctly
set during moves.
splitcollectionmove:
-Splitting of the move signal in added/removed signals.
-Proper support of monitoring collections.
Difference to previous patch is that some special cases are now handled
properly, i.e. if a monitored collection is moved.
entitytreemodel:
-proper support of monitored collections
With these three patches it is becomes actually possible to monitor single
collections (also apart from collection::root). I believe the model behaves
this way correctly in all possible cases, but some more testing might be
needed.
I currently don't have access to the new reviewboard, so I can't upload the
patches there, but I will do that asap.
Just to let you know what is going on.
Cheers,
Chris
On Friday 28 January 2011 17:54:01 Christian Mollekopf wrote:
> > 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: notifyinterresourcemove_chris2.patch
Type: text/x-patch
Size: 4917 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20110201/a90204d3/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: splitcollectionmove_chris2.patch
Type: text/x-patch
Size: 15881 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20110201/a90204d3/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: entitytreemodel.patch
Type: text/x-patch
Size: 15738 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20110201/a90204d3/attachment-0002.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