Review Request 127558: Fix Coverty Scan ID 1342699 - Uninitialized pointer field

Andreas Cord-Landwehr cordlandwehr at kde.org
Sun Apr 3 09:56:32 UTC 2016



> On April 3, 2016, 7:50 vorm., Andreas Cord-Landwehr wrote:
> > The change looks correct. However, IMO a refactoring of this code to use QScopedPointer to ensure that the dialog objects are always destroyed would be the better solution.
> > If you want to keep your change minimal and only fix the initializations, then I would assure the delete logic with some Q_ASSERT statements, yet I would prefer to introduce smart pointers to have a more clear resource ownership, which implicitly also ensures correct initializations.
> 
> Hartmut Riesenbeck wrote:
>     I agree with the smart pointers. But I thought already, that it would be quite more elegant to put the dialog stuff in a separate class (e.g. EntyFilterDialog). This would simplifie the EntryFilter code and its function would better reflected by its name. This would be a little bit more work but, if you agree I'm willing to do it.

Yes, a separate class for the dialog makes sense. Please go on :)


- Andreas


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127558/#review94205
-----------------------------------------------------------


On April 2, 2016, 9:09 nachm., Hartmut Riesenbeck wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127558/
> -----------------------------------------------------------
> 
> (Updated April 2, 2016, 9:09 nachm.)
> 
> 
> Review request for KDE Edu.
> 
> 
> Repository: parley
> 
> 
> Description
> -------
> 
> All member variables of base type are now initialized. The members of
> pointer type are set to zero after deleting.
> 
> 
> Diffs
> -----
> 
>   src/collection/entryfilter.cpp d332020da9cae17d221bd211950eb6349988a8e5 
> 
> Diff: https://git.reviewboard.kde.org/r/127558/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Hartmut Riesenbeck
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20160403/96918035/attachment.html>


More information about the kde-edu mailing list