Skip to content
  • David Faure's avatar
    KRecursiveFilterProxyModel: many many more unittests, and fixing what they found. · 445453a6
    David Faure authored
    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
    445453a6