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

List:       kde-edu-devel
Subject:    Re: Review Request 119119: bugfix: 332596 - crash when exiting unfinished practice
From:       "Andreas Xavier" <andxav () zoho ! com>
Date:       2014-07-23 17:39:20
Message-ID: 20140723173920.14616.96753 () probe ! kde ! org
[Download RAW message or body]

--===============5110046260881225309==
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/119119/
-----------------------------------------------------------

(Updated July 23, 2014, 5:39 p.m.)


Status
------

This change has been marked as submitted.


Review request for KDE Edu.


Bugs: 332596
    http://bugs.kde.org/show_bug.cgi?id=332596


Repository: parley


Description
-------

Problem: The bug was that if the qstyled KLineEdit answerEdit held focus when the \
WrittenPracticeWidget was deleted, then a focus event passed to the deleted KLineEdit \
would be passed to the QStyleSheet and return an invalid pointer to an already \
deleted QStyle.  
Fix: This patch sets the focus to helpLabel before the object is deleted. It does \
this by calling modeWidgetDestroyed(), which calls objectDestroyed() before the focus \
changing event will be invalid. 


Diffs
-----

  src/practice/writtenpracticewidget.h 9b25987 
  src/practice/writtenpracticewidget.cpp f20ac6d 
  src/practice/abstractwidget.h e9ef394 
  src/practice/abstractwidget.cpp f992054 
  src/practice/guifrontend.h 60e6fdc 
  src/practice/guifrontend.cpp 99fc015 
  src/practice/practicemainwindow.cpp cee231c 

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


Testing
-------

Replicated the GUI conditions of the bug by hand, before and after the fix.


Thanks,

Andreas Xavier


--===============5110046260881225309==
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/119119/">https://git.reviewboard.kde.org/r/119119/</a>
  </td>
    </tr>
   </table>
   <br />




<table bgcolor="#e0e0e0" width="100%" cellpadding="12" style="border: 1px gray solid; \
border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">  <tr>
  <td>
   <h1 style="margin: 0; padding: 0; font-size: 10pt;">This change has been marked as \
submitted.</h1>  </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 Andreas Xavier.</div>


<p style="color: grey;"><i>Updated July 23, 2014, 5:39 p.m.</i></p>







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


 <a href="http://bugs.kde.org/show_bug.cgi?id=332596">332596</a>


</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;">Problem: The bug was that if the qstyled KLineEdit \
answerEdit held focus when the WrittenPracticeWidget was deleted, then a focus event \
passed to the deleted KLineEdit would be passed to the QStyleSheet and return an \
invalid pointer to an already deleted QStyle.</p> <p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Fix: \
This patch sets the focus to helpLabel before the object is deleted. It does this by \
calling modeWidgetDestroyed(), which calls objectDestroyed() before the focus \
changing event will be invalid. </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;">Replicated the GUI conditions of the bug by hand, \
before and after the fix.</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/writtenpracticewidget.h <span style="color: \
grey">(9b25987)</span></li>

 <li>src/practice/writtenpracticewidget.cpp <span style="color: \
grey">(f20ac6d)</span></li>

 <li>src/practice/abstractwidget.h <span style="color: grey">(e9ef394)</span></li>

 <li>src/practice/abstractwidget.cpp <span style="color: grey">(f992054)</span></li>

 <li>src/practice/guifrontend.h <span style="color: grey">(60e6fdc)</span></li>

 <li>src/practice/guifrontend.cpp <span style="color: grey">(99fc015)</span></li>

 <li>src/practice/practicemainwindow.cpp <span style="color: \
grey">(cee231c)</span></li>

</ul>

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






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




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


--===============5110046260881225309==--



_______________________________________________
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