[Kde-pim] Review Request 107153: Put new items from resource sync into proper childEntities collection when using InvisibleCollectionFetch

Martin Klapetek martin.klapetek at gmail.com
Tue Jan 29 10:14:37 GMT 2013



> On Nov. 3, 2012, 10:40 p.m., Kevin Krammer wrote:
> > Looks in line with similar checks earlier on.
> > Do the ETM unit tests still pass with this change? Do you think you could come up with an additional test that fails without this and succeeds with it? (so we avoid introducing a regression later on)
> 
> Martin Klapetek wrote:
>     Sure, I'll have a look.
> 
> Martin Klapetek wrote:
>     Sorry, I completely forgot about this, but now I've investigated the existing test suite for Akonadi and ETM especially and I /think/ the InvisibleCollectionFetch won't be possible/easy to test at all with the existing tests - there is the FakeAkonadiServerCommand stuff which operates on the ETM itself. When there are data being inserted through the Fake commands, it looks for the collection *in* the model, however with the InvisibleCollectionFetch there are no collections in the model and so it asserts when it cannot find the proper collection. So I guess this would require quite large changes in the testing framework (and with my Akonadi/ETM internals knowledge I don't think I want to do that).
>     
>     Btw. EntityTreeModelTest::testItemMove fail on current master.

Btw. EntityTreeModelTest::testItemMove fail on current master. --> without my change, that is :)


- Martin


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


On Oct. 31, 2012, 2:59 p.m., Martin Klapetek wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/107153/
> -----------------------------------------------------------
> 
> (Updated Oct. 31, 2012, 2:59 p.m.)
> 
> 
> Review request for KDEPIM-Libraries and Stephen Kelly.
> 
> 
> Description
> -------
> 
> When using ETM with InvisibleCollectionFetch collection fetch strategy, new added items from resource syncing ends up in wrong collection and just empty data are displayed in the view. Debugging this I discovered that the newly created items must be stored with "m_rootCollection.id()" as key instead of "collection.id()" (m_childEntities[collection.id()] is actually empty/non-existant even though the model has valid items from this collection) as the model is actually just a flat list.
> 
> 
> Diffs
> -----
> 
>   akonadi/entitytreemodel_p.cpp b1c8378 
> 
> Diff: http://git.reviewboard.kde.org/r/107153/diff/
> 
> 
> Testing
> -------
> 
> Tested my SocialFeed model, which uses InvisibleCollectionFetch, this fixes showing new items in the plasmoid.
> 
> 
> Thanks,
> 
> Martin Klapetek
> 
>

_______________________________________________
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