[Kde-pim] Review Request: Workaround crash on exit with Qt 4.8

Christoph Feck christoph at maxiom.de
Sat Oct 29 14:17:14 BST 2011



> On Oct. 29, 2011, 10:33 a.m., Oswald Buddenhagen wrote:
> > akregator/src/folder.cpp, line 68
> > <http://git.reviewboard.kde.org/r/102981/diff/1/?file=39808#file39808line68>
> >
> >     you don't need the temporary; just delete children.takeFirst();
> >     
> >     this is no workaround, but a proper fix. TreeNode's d'tor modifies children, which invalidates qDeleteAll's iterator.
> >     
> >     an alternative fix is saving the child list to a temporary and clearing the list, then deleteAll on the temporary. this may be faster (possible removeAll()s in the d'tor go over an empty list), but has some potential to break things if the d'tor relies on actually seeing all children.

Thanks for the explanation, I only know understand the bug. Attached is the correct fix, because I cannot remove the item from the list prior to calling delete constructor, as the removeChildren() relies on seing the item to do its cleanup before removing itself from the parent list.


- Christoph


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


On Oct. 29, 2011, 1:14 p.m., Christoph Feck wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/102981/
> -----------------------------------------------------------
> 
> (Updated Oct. 29, 2011, 1:14 p.m.)
> 
> 
> Review request for KDEPIM, Christophe Giboudeaux and Frank Osterfeld.
> 
> 
> Description
> -------
> 
> Workaround crash on exit with Qt 4.8. Didn't see a bug report for it yet, but there is a related one for plasma at https://bugs.kde.org/show_bug.cgi?id=284989
> 
> 
> Diffs
> -----
> 
>   akregator/src/folder.cpp f2385b0 
> 
> Diff: http://git.reviewboard.kde.org/r/102981/diff/diff
> 
> 
> Testing
> -------
> 
> Works.
> 
> 
> Thanks,
> 
> Christoph Feck
> 
>

_______________________________________________
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