Skip to content
Commit 445453a6 authored by David Faure's avatar David Faure
Browse files

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

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.

REVIEW: 122227
parent 0df92439
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment