Review Request 127663: Fix Coverty Scan ID 1343237 - Unused value

Hartmut Riesenbeck hartmut.riesenbeck at gmx.de
Sun May 1 20:32:37 UTC 2016


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

(Updated May 1, 2016, 8:32 p.m.)


Status
------

This change has been marked as submitted.


Review request for KDE Edu.


Changes
-------

Submitted with commit afb87ba4222629d7cc3035e41087064ba7e016f7 by Hartmut Riesenbeck to branch master.


Repository: parley


Description
-------

The coverty scan issue in BlockOptions::checkValidity() was fixed by
moving the boolean variable "found" outside the for loop. By this it
wouldn't reset to false at the beginning of each loop cycle and works
now as expected.

By the way BlockOptions::checkValidity() was refactored to run the for
loops only when checkboxes are enabled. Also a validy check was added
when check boxes becomes checked. Removed unused QString variable.

Defined the boolean variable "found" new before each for loop to make it clear that its only used into this loop.


Diffs
-----

  src/practice/configure/blockoptions.cpp a9a8032e787c82bb572b60e15e51468bc7cc825c 

Diff: https://git.reviewboard.kde.org/r/127663/diff/


Testing
-------

Tested the configure lesson dialog manualy by selecting appropriate values for blocking and expiering to make the warning message box appear.


Thanks,

Hartmut Riesenbeck

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


More information about the kde-edu mailing list