[Kde-pim] Review Request: Fix crashes in resource local dir

Sergio Martins iamsergio at gmail.com
Thu Apr 16 21:20:29 BST 2009


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

(Updated 2009-04-16 13:20:29.803924)


Review request for KDE PIM.


Changes
-------

Removed whitespace


Summary
-------

Resource local dir is a calendar resource that uses a separate file for each incidence. It uses a KDirWatch to listen for alterations made by external applications and tells KOrganizer to reload the incidences. Whenever KDirWatch sees an alteration, resource local dir closes and reopens the calendar, freeing all incidences, which are still in use by Korganizer, so it crashes.

Furthermore, KDirWatch also detects changes made by KOrganizer itself, so Korganizer ends up redrawing stuff it already has.

I changed resource local dir so it doesn't close and reopen the whole calendar for each incidence, instead I just add/remove/update the incidence in the calendar.

Basically the important parts of the patch are the slots that catch signals from KDirWatch, the rest is just refactoring to preserve BC.
    
void updateIncidenceInCalendar( const QString &file );
void addIncidenceToCalendar( const QString &file );
void deleteIncidenceFromCalendar( const QString &file );


resourcelocaldir.h remains untouched, so I guess this is BC.


This addresses bugs 180221 and 187595.
    https://bugs.kde.org/show_bug.cgi?id=180221
    https://bugs.kde.org/show_bug.cgi?id=187595


Diffs (updated)
-----

  trunk/KDE/kdepimlibs/kcal/resourcelocaldir.cpp 952423 
  trunk/KDE/kdepimlibs/kcal/resourcelocaldir_p.h 952423 

Diff: http://reviewboard.kde.org/r/516/diff


Testing
-------

Made alterations/deletions/additions with KOrganizer.

Made alterations/deletions/additions directly with an editor to see if KOrganizer updated automatically.


Thanks,

Sergio

_______________________________________________
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