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

Andreas Cord-Landwehr cordlandwehr at kde.org
Sun Apr 3 07:50:01 UTC 2016


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



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.


src/collection/entryfilter.cpp (line 206)
<https://git.reviewboard.kde.org/r/127558/#comment64098>

    Maybe here and at the following change it makes sense to use Q_ASSERT(!m_button_dialog) to ensure that this logic works.


- Andreas Cord-Landwehr


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/c05b496d/attachment.html>


More information about the kde-edu mailing list