Review Request 122227: KRecursiveFilterProxyModel: many many more unittests, and fixing what they found.

David Faure faure at
Fri Jan 23 18:11:03 GMT 2015

This is an automatically generated e-mail. To reply, visit:

Review request for kdelibs and Christian Mollekopf.

Repository: kdelibs


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

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.


  kdeui/itemviews/krecursivefilterproxymodel.cpp efa286ad87ded962b20c8a581b659d1b154ebf3a 
  kdeui/tests/krecursivefilterproxymodeltest.cpp 3bcb72980730cb22f887ae8fa5fbd91b5609aeb6 



Unittest, obviously.
+ KMail smoke testing.


David Faure

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the kde-core-devel mailing list