Revision 104c51d...

Go back to digest for 14th July 2013

Optimization in KDE-PIM

Dan Vratil committed changes in [kdepim-runtime/dirresources] /:

Add file monitoring to iCalDir and vCardDir resources and move common code to shrade base class

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.

File Changes

Added 3 files
  • /shared
  •   resources/dirresource.h
  •   resources/dirresourcebase.cpp
  •   resources/dirresourcebase.h
Modified 6 files
  •   resources/icaldir/CMakeLists.txt
  •   resources/icaldir/icaldirresource.cpp
  •   resources/icaldir/icaldirresource.h
  •   resources/vcarddir/CMakeLists.txt
  •   resources/vcarddir/vcarddirresource.cpp
  •   resources/vcarddir/vcarddirresource.h
9 files changed in total