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

List:       kde-core-devel
Subject:    Review Request: Fix KCategorizedView race
From:       Thomas_Lübking <thomas.luebking () web ! de>
Date:       2011-12-05 14:21:11
Message-ID: 20111205142111.26176.55284 () vidsolbach ! de
[Download RAW message or body]

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

Review request for kdelibs, Rafael Fernández López and Jaime Torres Amate.


Description
-------

Also see https://git.reviewboard.kde.org/r/103313/


QListView::updateGeometries() has it's own opinion on whether the scrollbars should be visible \
(valid range) or not and triggers a (sometimes additionally timered) resize through \
::layoutChildren() http://qt.gitorious.org/qt/qt/blobs/4.7/src/gui/itemviews/qlistview.cpp#line1499
 (the comment above the main block isn't all accurate, layoutChldren is called regardless of \
the policy)

As a result QListView and KCategorizedView occasionally started a race on the scrollbar \
visibility, effectively blocking the UI So we prevent QListView from having an own opinion on \
the scrollbar visibility by fixing it before calling the baseclass \
QListView::updateGeometries() and restoring the policy afterwards


This addresses bugs 213068 and 287847.
    http://bugs.kde.org/show_bug.cgi?id=213068
    http://bugs.kde.org/show_bug.cgi?id=287847


Diffs
-----

  kdeui/itemviews/kcategorizedview.cpp 46a1cde 
  kutils/kpluginselector.cpp ca0691d 

Diff: http://git.reviewboard.kde.org/r/103335/diff/diff


Testing
-------

Yes, resizing the "kcmshell4 kwincompositing", "all effects" KPluginSelector with large \
scrollbar sizes (bespin/position indicator/32px; oxygen was often sufficient with the default \
size) after commit e91e5fed6b1aad365e12e919f430c3e8147552d3 (see \
https://git.reviewboard.kde.org/r/103165/ ) was a reliable way to trigger the issue for me. It \
also showed that resize/updateGeometries occured in pairs (ie 4calls forming  a block), what's \
never happened again with the patch.


Thanks,

Thomas Lübking


[Attachment #3 (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://git.reviewboard.kde.org/r/103335/">http://git.reviewboard.kde.org/r/103335/</a>
  </td>
    </tr>
   </table>
   <br />


<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: \
url('http://git.reviewboard.kde.org/media/rb/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 kdelibs, Rafael Fernández López and Jaime Torres Amate.</div>
<div>By Thomas Lübking.</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;">Also see \
https://git.reviewboard.kde.org/r/103313/


QListView::updateGeometries() has it&#39;s own opinion on whether the scrollbars should be \
visible (valid range) or not and triggers a (sometimes additionally timered) resize through \
::layoutChildren() http://qt.gitorious.org/qt/qt/blobs/4.7/src/gui/itemviews/qlistview.cpp#line1499
 (the comment above the main block isn&#39;t all accurate, layoutChldren is called regardless \
of the policy)

As a result QListView and KCategorizedView occasionally started a race on the scrollbar \
visibility, effectively blocking the UI So we prevent QListView from having an own opinion on \
the scrollbar visibility by fixing it before calling the baseclass \
QListView::updateGeometries() and restoring the policy afterwards </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;">Yes, resizing the \
&quot;kcmshell4 kwincompositing&quot;, &quot;all effects&quot; KPluginSelector with large \
scrollbar sizes (bespin/position indicator/32px; oxygen was often sufficient with the default \
size) after commit e91e5fed6b1aad365e12e919f430c3e8147552d3 (see \
https://git.reviewboard.kde.org/r/103165/ ) was a reliable way to trigger the issue for me. It \
also showed that resize/updateGeometries occured in pairs (ie 4calls forming  a block), \
what&#39;s never happened again with the patch.</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="http://bugs.kde.org/show_bug.cgi?id=213068">213068</a>, 

 <a href="http://bugs.kde.org/show_bug.cgi?id=287847">287847</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>kdeui/itemviews/kcategorizedview.cpp <span style="color: grey">(46a1cde)</span></li>

 <li>kutils/kpluginselector.cpp <span style="color: grey">(ca0691d)</span></li>

</ul>

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




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




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



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

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