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

List:       kwrite-devel
Subject:    Re: Review Request 113917: Fix assert in ~QPersistentModelIndex
From:       "Kevin Funk" <krf () gmx ! de>
Date:       2013-12-31 16:00:41
Message-ID: 20131231160041.12418.76171 () probe ! kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> On Dec. 31, 2013, 3:58 p.m., Commit Hook wrote:
> > This review has been submitted with commit \
> > b768749230872b5acf0e2816dd855409f6d70733 by Kevin Funk to branch master.

Re. applying this in frameworks branch:

I suggest reverting the change in katecompletionmodel.cpp as of \
e6374518f5a966b8badda3a5e90fb873cd7ec08e and then merge master back into frameworks.


- Kevin


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


On Dec. 31, 2013, 3:58 p.m., Kevin Funk wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/113917/
> -----------------------------------------------------------
> 
> (Updated Dec. 31, 2013, 3:58 p.m.)
> 
> 
> Review request for Kate and Milian Wolff.
> 
> 
> Bugs: 236948
> http://bugs.kde.org/show_bug.cgi?id=236948
> 
> 
> Repository: kate
> 
> 
> Description
> -------
> 
> Fix assert in ~QPersistentModelIndex
> 
> KateCompletionWidget may call QAIM::setCurrentIndex during a reset of
> the model, inside KateCompletionWidget::modelContentChanged(). At this
> point, model indices are invalid, but QAIM wasn't informed about it.
> 
> The main problem is that KateCompletionModel doesn't use the
> (relatively) new {begin,end}ResetModel blocks to make persistent model
> indices
> invalid as soon as we start resetting the model. Instead reset() is used
> *after* we have reset the model. However, KateCompletionModel may emit
> contentGeometryChanged too early (before a reset()) and hence triggering
> QAIM::setCurrentIndex while QAIM is still referencing now invalid
> persistent model indices.
> 
> Other changes:
> Remove contentGeometryChanged. Instead, use layoutChanged() and
> modelReset() signals to react to model changes.
> 
> This also ports KateCompletionModel away from deprecated QAIM methods
> such as QAIM::reset()
> 
> BUG: 236948
> FIXED-IN: 4.13
> 
> 
> Diffs
> -----
> 
> part/completion/katecompletionwidget.cpp 4bb077e0973fd1eb9f1f5a7bb3e9bccae1a79511 
> part/completion/katecompletionmodel.cpp 3fa8080ff95deb1e24327063ccd19dbb13ff49a8 
> part/completion/katecompletionmodel.h 5fedbccc37cd49b7403827dafce15b498e99b160 
> 
> Diff: https://git.reviewboard.kde.org/r/113917/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Kevin Funk
> 
> 


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





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On December 31st, 2013, 3:58 p.m. UTC, <b>Commit \
Hook</b> wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">  <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">This review has been submitted with commit \
b768749230872b5acf0e2816dd855409f6d70733 by Kevin Funk to branch master.</pre>  \
</blockquote>







</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Re. applying this in \
frameworks branch:

I suggest reverting the change in katecompletionmodel.cpp as of \
e6374518f5a966b8badda3a5e90fb873cd7ec08e and then merge master back into \
frameworks.</pre> <br />










<p>- Kevin</p>


<br />
<p>On December 31st, 2013, 3:58 p.m. UTC, Kevin Funk wrote:</p>








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

<div>Review request for Kate and Milian Wolff.</div>
<div>By Kevin Funk.</div>


<p style="color: grey;"><i>Updated Dec. 31, 2013, 3:58 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=236948">236948</a>


</div>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kate
</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;">Fix assert in ~QPersistentModelIndex

KateCompletionWidget may call QAIM::setCurrentIndex during a reset of
the model, inside KateCompletionWidget::modelContentChanged(). At this
point, model indices are invalid, but QAIM wasn&#39;t informed about it.

The main problem is that KateCompletionModel doesn&#39;t use the
(relatively) new {begin,end}ResetModel blocks to make persistent model
indices
invalid as soon as we start resetting the model. Instead reset() is used
*after* we have reset the model. However, KateCompletionModel may emit
contentGeometryChanged too early (before a reset()) and hence triggering
QAIM::setCurrentIndex while QAIM is still referencing now invalid
persistent model indices.

Other changes:
Remove contentGeometryChanged. Instead, use layoutChanged() and
modelReset() signals to react to model changes.

This also ports KateCompletionModel away from deprecated QAIM methods
such as QAIM::reset()

BUG: 236948
FIXED-IN: 4.13</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>part/completion/katecompletionwidget.cpp <span style="color: \
grey">(4bb077e0973fd1eb9f1f5a7bb3e9bccae1a79511)</span></li>

 <li>part/completion/katecompletionmodel.cpp <span style="color: \
grey">(3fa8080ff95deb1e24327063ccd19dbb13ff49a8)</span></li>

 <li>part/completion/katecompletionmodel.h <span style="color: \
grey">(5fedbccc37cd49b7403827dafce15b498e99b160)</span></li>

</ul>

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







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








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



_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel


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

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