[Kde-pim] [Differential] [Request, 12 lines] D1702: Remove event from KCalCore::MemoryCalendar before removing it from Akonadi::CalendarBase
dvratil (Daniel Vrátil)
noreply at phabricator.kde.org
Sun May 29 12:31:20 BST 2016
dvratil created this revision.
dvratil added a reviewer: smartins.
dvratil set the repository for this revision to rAKONADICALENDAR Akonadi-Calendar.
dvratil added a project: KDE PIM.
Restricted Application added a subscriber: kde-pim.
REVISION SUMMARY
KCalCore::Calendar::CalendarObserver gets notified via calendarIncidenceAboutToBeDeleted() about incidence being removed from a KCalCore::Calendar. If the incidence is removed from Akonadi::CalendarBase internal hashes before calling MemoryCalendar::deleteIncidence(), then the observer no longer has any means how to resolve the incidence-about-to-be-removed back to respective Akonadi::Item. This patch moves the call to MemoryCalendar::deleteIncidence() to happen before the incidence is removed from CalendarBase internal hashes, so that observers can still query the calendar about the event from the calendarIncidenceAboutToBeDeleted() callback.
The comment in CalendarBase says, that the call to KCalCore::MemoryCalendar::deleteIncidence has to be called last due to reentrancy, however looking at the code in CalendarBasePrivate::internalRemove() and looking at the callers of that method, the position of the call does not really seem to have any effect on reentrancy of the method. Sergio, any ideas what the comment meant?
REPOSITORY
rAKONADICALENDAR Akonadi-Calendar
REVISION DETAIL
https://phabricator.kde.org/D1702
AFFECTED FILES
src/calendarbase.cpp
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: dvratil, smartins
Cc: kde-pim, dvasin, winterz, smartins, vkrause, mlaurent, knauss, dvratil
_______________________________________________
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