[Kde-pim] [patch] kdepimlibs/kabc: fix crash appearing at qDeleteAll()
Jaroslaw Staniek
js at iidea.pl
Tue Jun 17 23:13:12 BST 2008
(for review; enterprise4 branch)
- Resource::clear() fix crash appearing at qDeleteAll(mDistListMap) beacuse
DistributionList objects' destructor calls
Resource::removeDistributionList(), which in turn modifies with
mDistListMap. We are now blocking removeDistributionList() when qDeleteAll()
is called.
Instead of erasing() every deleted item from the map, we're calling
QMap::clear() afterwards.
- simplify code related to mDistListMap: use Qt4 facilities and some
more constness
A side note: not only qDeleteAll() can be counted as dangerous addition in the
post-Qt3 world (so let's think twice) but I've seen a number of similar
problems with children that attempt to remove themselves from the container.
--
regards / pozdrawiam, Jaroslaw Staniek
Sponsored by OpenOffice Polska (http://www.openoffice.com.pl/en) to work on
Kexi & KOffice (http://www.kexi.pl/en, http://www.koffice.org/kexi)
KDE Libraries for MS Windows (http://windows.kde.org)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: kabc_resource.patch
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20080618/63d7ff2b/attachment.ksh>
-------------- next part --------------
_______________________________________________
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