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

Sergio Martins iamsergio at gmail.com
Wed Apr 8 22:01:23 BST 2009



> On 2009-04-05 01:03:49, Kevin Krammer wrote:
> > trunk/KDE/kdepimlibs/kcal/resourcelocaldir.cpp, line 125
> > <http://reviewboard.kde.org/r/516/diff/2/?file=4933#file4933line125>
> >
> >     Have you tested the case where a file is moved over the existing file?
> >     
> >     I vaguely remember a case where such an operation resulted in a created() rather than dirty().
> >     
> >

Seems that particulary case doesn't update KOrganizer immediately, user needs a refresh :(, the delete signal isn't emitted for the moved file, dfaure says we should use kdirlister for reliable signals.


- Sergio


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


On 2009-04-04 12:18:01, Sergio Martins wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/516/
> -----------------------------------------------------------
> 
> (Updated 2009-04-04 12:18:01)
> 
> 
> Review request for KDE PIM.
> 
> 
> 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
> -----
> 
>   trunk/KDE/kdepimlibs/kcal/resourcelocaldir_p.h 946603 
>   trunk/KDE/kdepimlibs/kcal/resourcelocaldir.cpp 946603 
> 
> 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