[Kde-pim] Single file resources create new collection when re-reading backend file
David Jarvie
djarvie at kde.org
Sun Jul 31 18:49:49 BST 2011
The SingleFileResource base class does a clearCache() and synchronize() when it re-reads the backend file (e.g. if it is changed by an external process). This has the side effect that the resource's collection is removed and a new one created. The way I've coded things in KAlarm, this poses a problem, because KAlarm stores collection IDs to identify its calendars. If a resource changes its collection ID, this makes KAlarm think that the calendar has been deleted, and a new one created, when all that has really happened is that the calendar's contents have changed.
Is there a good reason to create a new collection in these circumstances, or could this be changed to simply update the existing collection? If recreating the collection is really a good thing, what is a better way of keeping track of resources/collections within applications so that the link between a resource and its data isn't broken when this happens?
--
David Jarvie.
KDE developer.
KAlarm author -- http://www.astrojar.org.uk/kalarm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20110731/603447ff/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