[Kde-pim] Review Request 111149: Add file monitoring to ICalDir and VCardDir resources and move common code to shared base class

Kevin Krammer krammer at kde.org
Tue Jul 9 14:13:11 BST 2013



> On June 20, 2013, 1:06 p.m., Kevin Krammer wrote:
> > One general remark: I think it would be better to use different identifiers for the files than the UIDs of the entities. The UID could contain characters that are not allowed in the filesystem. I think there is even a bug report for that.
> 
> Dan Vrátil wrote:
>     There's even a patch in RB still waiting for someone to review it and /ship it/ :-). However the patch will not apply after this change, so if you are fine with that, I'll rebase the other patch after this is shipped.

I see you committed, waiting for the rebase of the UID/Filename fix :)


- Kevin


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


On July 9, 2013, 12:32 p.m., Dan Vrátil wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/111149/
> -----------------------------------------------------------
> 
> (Updated July 9, 2013, 12: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