[Kde-pim] Review Request 111149: Add file monitoring to ICalDir and VCardDir resources and move common code to shared base class
Dan Vrátil
dvratil at redhat.com
Tue Jul 9 13:32:37 BST 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/111149/
-----------------------------------------------------------
(Updated July 9, 2013, 2:32 p.m.)
Review request for KDEPIM.
Description
-------
Similarily to iCal and vCard resources, the iCalDir and vCardDir resources are essentially identical. This patch moves all the code to a template-based DirResource class, making VCardDirResource and ICalDirResource specializations of the DirResource class, implementing only loading and saving of payload from/to file. QObject-related stuff is implemented in DirResourceBase class.
The shared code now also supports watching the directory (via KDirWatch) for changes and will automatically add, update or remove entries from Akonadi when a file is added, changed or removed in the resource's data directory.
This addresses bug 321343.
http://bugs.kde.org/show_bug.cgi?id=321343
Diffs
-----
resources/icaldir/CMakeLists.txt 3ca6c5e
resources/icaldir/icaldirresource.h 8fe7733
resources/icaldir/icaldirresource.cpp b294be0
resources/shared/dirresource.h PRE-CREATION
resources/shared/dirresourcebase.h PRE-CREATION
resources/shared/dirresourcebase.cpp PRE-CREATION
resources/vcarddir/CMakeLists.txt 7a58e6f
resources/vcarddir/vcarddirresource.h 1423bdf
resources/vcarddir/vcarddirresource.cpp 5d17d26
Diff: http://git.reviewboard.kde.org/r/111149/diff/
Testing
-------
Set up vCardDir resource to watch for /tmp/vcarddir. Moved a new .vcard file into the folder and it was immediately added to Akonadi. Changing the file updated payload stored in Akonadi and removing the file removed respective item from Akonadi. Same for the iCalDir.
Thanks,
Dan Vrátil
_______________________________________________
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