[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-edu-devel
Subject:    Review Request 127663: Fix Coverty Scan ID 1343237 - Unused value
From:       Hartmut Riesenbeck <hartmut.riesenbeck () gmx ! de>
Date:       2016-04-16 21:26:19
Message-ID: 20160416212619.15182.40266 () mimi ! kde ! org
[Download RAW message or body]

--===============2658187896005327208==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit


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

Review request for KDE Edu.


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


--===============2658187896005327208==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 7bit




<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 \
solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">  \
<tr>  <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/127663/">https://git.reviewboard.kde.org/r/127663/</a>
  </td>
    </tr>
   </table>
   <br />




<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: \
1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;">  <tr>
  <td>

<div>Review request for KDE Edu.</div>
<div>By Hartmut Riesenbeck.</div>










<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
parley
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">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.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">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.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Defined the boolean variable "found" new before each \
for loop to make it clear that its only used into this loop.</p></pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Tested the configure lesson dialog manualy by \
selecting appropriate values for blocking and expiering to make the warning message \
box appear.</p></pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>src/practice/configure/blockoptions.cpp <span style="color: \
grey">(a9a8032e787c82bb572b60e15e51468bc7cc825c)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/127663/diff/" style="margin-left: \
3em;">View Diff</a></p>






  </td>
 </tr>
</table>



  </div>
 </body>
</html>


--===============2658187896005327208==--


[Attachment #3 (text/plain)]

_______________________________________________
kde-edu mailing list
kde-edu@mail.kde.org
https://mail.kde.org/mailman/listinfo/kde-edu


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic