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

List:       koffice-devel
Subject:    Review Request: fix for bug
From:       "Boudewijn Rempt" <boud () valdyas ! org>
Date:       2010-06-24 13:27:44
Message-ID: 20100624132744.5619.51501 () localhost
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/4452/
-----------------------------------------------------------

Review request for KOffice.


Summary
-------

Fix https://bugs.kde.org/show_bug.cgi?id=240353 by removing the circular dependency between \
KoTextAnchor and KoTextShapeContainerModel. KoTextAnchor is owned by the QTextDocument and can \
move from shape to shape. However, it has a reference to the shape in the form of a pointer to \
KoTextShapeContainerModel. It is possible that the shape will be deleted but the reference not \
set to 0, then when the anchor is positioned next, it tries to remove itself from the deleted \
model. This patch makes sure that when a model is deleted it tells all anchors it has a \
relation to that it doesn't exist anymore.


This addresses bug https://bugs.kde.org/show_bug.cgi?id=240353.
    https://bugs.kde.org/show_bug.cgi?id=https://bugs.kde.org/show_bug.cgi?id=240353


Diffs
-----

  trunk/koffice/libs/kotext/KoTextAnchor.h 1142240 
  trunk/koffice/libs/kotext/KoTextAnchor.cpp 1142240 
  trunk/koffice/libs/kotext/KoTextShapeContainerModel.h 1142240 
  trunk/koffice/libs/kotext/KoTextShapeContainerModel.cpp 1142240 

Diff: http://reviewboard.kde.org/r/4452/diff


Testing
-------

Test with the document from the specified bug. Also run under memcheck.


Thanks,

Boudewijn


[Attachment #5 (text/html)]

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


<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: \
url('http://reviewboard.kde.orgrb/images/review_request_box_top_bg.png'); background-position: \
left top; background-repeat: repeat-x; border: 1px black solid;">  <tr>
  <td>

<div>Review request for KOffice.</div>
<div>By Boudewijn Rempt.</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;">Fix https://bugs.kde.org/show_bug.cgi?id=240353 by \
removing the circular dependency between KoTextAnchor and KoTextShapeContainerModel. \
KoTextAnchor is owned by the QTextDocument and can move from shape to shape. However, it has a \
reference to the shape in the form of a pointer to KoTextShapeContainerModel. It is possible \
that the shape will be deleted but the reference not set to 0, then when the anchor is \
positioned next, it tries to remove itself from the deleted model. This patch makes sure that \
when a model is deleted it tells all anchors it has a relation to that it doesn&#39;t exist \
anymore.</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;">Test with the document from the specified bug. Also run \
under memcheck.</pre>  </td>
 </tr>
</table>



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


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



</div>


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

 <li>trunk/koffice/libs/kotext/KoTextAnchor.h <span style="color: grey">(1142240)</span></li>

 <li>trunk/koffice/libs/kotext/KoTextAnchor.cpp <span style="color: grey">(1142240)</span></li>

 <li>trunk/koffice/libs/kotext/KoTextShapeContainerModel.h <span style="color: \
grey">(1142240)</span></li>

 <li>trunk/koffice/libs/kotext/KoTextShapeContainerModel.cpp <span style="color: \
grey">(1142240)</span></li>

</ul>

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




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




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



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


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

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