[Kde-pim] Review Request: folder properties: do not create a job on the stack

Jonathan Marten jjm at keelhaul.me.uk
Fri Nov 30 10:25:21 GMT 2012



> On Nov. 30, 2012, 9 a.m., Laurent Montel wrote:
> > kmail/kmmainwidget.cpp, line 4694
> > <http://git.reviewboard.kde.org/r/107521/diff/2/?file=96934#file96934line4694>
> >
> >     Perhaps add an other assert 
> >     Q_ASSERT( !fetch->collections().isEmpty() )
> >     just to be sure

Used kWarning, as suggested below.


> On Nov. 30, 2012, 9 a.m., Laurent Montel wrote:
> > kmail/kmmainwidget.cpp, line 4711
> > <http://git.reviewboard.kde.org/r/107521/diff/2/?file=96934#file96934line4711>
> >
> >     add "const QString pageToShow"

Made const.


> On Nov. 30, 2012, 9 a.m., Laurent Montel wrote:
> > kmail/kmmainwidget.cpp, line 4685
> > <http://git.reviewboard.kde.org/r/107521/diff/2/?file=96934#file96934line4685>
> >
> >     no necessary it's autostarted


- Jonathan


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


On Nov. 30, 2012, 10:25 a.m., Jonathan Marten wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/107521/
> -----------------------------------------------------------
> 
> (Updated Nov. 30, 2012, 10:25 a.m.)
> 
> 
> Review request for KDEPIM.
> 
> 
> Description
> -------
> 
> While reviewing https://git.reviewboard.kde.org/r/107341/, Kevin Krammer observed that a job was being created on the stack (by already existing code).  Since jobs auto-delete themselves by default, this is incorrect and could lead to a crash as a result of a double deletion.
> 
> This change creates the job on the heap instead, allowing it to delete itself when appropriate.
> 
> 
> Diffs
> -----
> 
>   kmail/kmmainwidget.h 5eefaa7 
>   kmail/kmmainwidget.cpp 5568b9a 
> 
> Diff: http://git.reviewboard.kde.org/r/107521/diff/
> 
> 
> Testing
> -------
> 
> Built kdepim with this change, checked operation of "Folder Properties" dialogue for both local and IMAP folders.
> 
> 
> Thanks,
> 
> Jonathan Marten
> 
>

_______________________________________________
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