[Kde-pim] Akonadi collection attribute not being fetched correctly

Kevin Krammer kevin.krammer at gmx.at
Fri Sep 10 07:23:27 BST 2010


On Friday, 2010-09-10, David Jarvie wrote:
> Sometimes calling Collection::attribute<T>() does not return the correct
> value of the attribute. I find that sometimes when an attribute is
> updated, and a CollectionModifyJob is then used to update the value in the
> Akonadi database, the database is updated successfully (as shown in
> AkonadiConsole) and the correct, new, value of the attribute is returned
> if it is accessed in the CollectionModifyJob result slot. But the next
> time the attribute is accessed in a different part of the program, the old
> value of the attribute is returned.

Maybe that other part of the code is still working with an older copy of the 
collection and thus its attribute.
E.g. stored as a member and neither updated after the collection modify nor 
through connection to a monitor signal.

> Is some special action needed to ensure that a specific Collection instance
> returns the up to date value of one of its Attributes?

No. As long as the collection is up to date, its attributes should be as well.

Cheers,
Kevin

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20100910/a72819ea/attachment.sig>
-------------- 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