[Kde-pim] [PATCH] Akonadi::ItemModel doesn't update its item cache

Dmitry Ivanov vonami at gmail.com
Sat Jun 21 13:29:42 BST 2008


On Saturday 21 June 2008 10:38:49 Dmitry Ivanov wrote:
> On Saturday 21 June 2008 00:27:46 Dmitry Ivanov wrote:
> > The attached patch fixed this bug. IIUC, qHash() for Akonadi::Item is
> > computed from id there is no need to update 'itemHash', only the value in
> > ItemContainer from 'items'.
>
> Partially wrong. In this particular case of ItemModel  the value of a key
> itself (in 'itemHash') doesn't matter since the keys are not used (only for
> lookup and qHash() returns the same hash value). But if someone someday
> decides to obtain all keys from 'itemHash' he will get wrong data. The new
> patch updates 'itemHash'  as well as 'items'.
>
> BTW, I wonder why does 'itemHash' use Akonadi::Item as a key? I think
> Akonadi::Item::Id would be enough.

Commited in rev 822765.

-- 
Dmitry
_______________________________________________
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