[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: Review Request 122227: KRecursiveFilterProxyModel: many many more unittests, and fixing what the
From: "Christian Mollekopf" <chrigi_1 () fastmail ! fm>
Date: 2015-01-26 7:48:05
Message-ID: 20150126074805.30682.16806 () probe ! kde ! org
[Download RAW message or body]
--===============1891943306824847495==
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/122227/#review74744
-----------------------------------------------------------
Ship it!
I tested this over the weekend. It fixes the problem originally addressed and seems \
to fix the crash I was having.
- Christian Mollekopf
On Jan. 23, 2015, 6:11 p.m., David Faure wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/122227/
> -----------------------------------------------------------
>
> (Updated Jan. 23, 2015, 6:11 p.m.)
>
>
> Review request for kdelibs and Christian Mollekopf.
>
>
> Repository: kdelibs
>
>
> Description
> -------
>
> 1) setData(false), i.e. a dataChanged that removes and item from the filter,
> didn't actually lead to removal. The code was only looking at changing to
> get in, not changing to get out.
>
> 2) On insertion, we can avoid emitting dataChanged up the chain, by
> finding out before the insertion which exact ancestor will be changed
> (lastHiddenAscendantForInsert).
>
> 3) On removal, well simplify the code (completeRemove was always true, unless
> ignoreRemove was set, so we only need to keep ignoreRemove), and avoid
> emitting dataChanged up the chain, by finding out which the last parent
> before one that should still be visible, and hide just that one.
>
> 4) While at it, an obvious optimization that could have been done
> since day one: filterAcceptsRow can return true as soon as a child wants
> to be shown.
>
>
> Diffs
> -----
>
> kdeui/itemviews/krecursivefilterproxymodel.cpp \
> efa286ad87ded962b20c8a581b659d1b154ebf3a \
> kdeui/tests/krecursivefilterproxymodeltest.cpp \
> 3bcb72980730cb22f887ae8fa5fbd91b5609aeb6
> Diff: https://git.reviewboard.kde.org/r/122227/diff/
>
>
> Testing
> -------
>
> Unittest, obviously.
> + KMail smoke testing.
>
>
> Thanks,
>
> David Faure
>
>
--===============1891943306824847495==
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/122227/">https://git.reviewboard.kde.org/r/122227/</a>
</td>
</tr>
</table>
<br />
<p>Ship it!</p>
<pre style="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;">I \
tested this over the weekend. It fixes the problem originally addressed and seems to \
fix the crash I was having.</p></pre> <br />
<p>- Christian Mollekopf</p>
<br />
<p>On January 23rd, 2015, 6:11 p.m. UTC, David Faure wrote:</p>
<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 kdelibs and Christian Mollekopf.</div>
<div>By David Faure.</div>
<p style="color: grey;"><i>Updated Jan. 23, 2015, 6:11 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kdelibs
</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;">1) setData(false), i.e. a dataChanged that removes and \
item from the filter, didn't actually lead to removal. The code was only looking at \
changing to get in, not changing to get out.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">2) On insertion, we can avoid emitting dataChanged up \
the chain, by finding out before the insertion which exact ancestor will be changed
(lastHiddenAscendantForInsert).</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">3) On removal, well simplify the code (completeRemove \
was always true, unless ignoreRemove was set, so we only need to keep ignoreRemove), \
and avoid emitting dataChanged up the chain, by finding out which the last parent
before one that should still be visible, and hide just that one.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">4) While at it, an obvious optimization that could \
have been done since day one: filterAcceptsRow can return true as soon as a child \
wants to be shown.</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;">Unittest, obviously. + KMail smoke testing.</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>kdeui/itemviews/krecursivefilterproxymodel.cpp <span style="color: \
grey">(efa286ad87ded962b20c8a581b659d1b154ebf3a)</span></li>
<li>kdeui/tests/krecursivefilterproxymodeltest.cpp <span style="color: \
grey">(3bcb72980730cb22f887ae8fa5fbd91b5609aeb6)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/122227/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
--===============1891943306824847495==--
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic