]> cloud.milkyroute.net Git - dolphin.git/commit
[FileItemRolesUpdater] Fix calculation of requested indexes
authorStefan Brüns <stefan.bruens@rwth-aachen.de>
Mon, 15 Feb 2021 10:16:32 +0000 (11:16 +0100)
committerStefan Brüns <stefan.bruens@rwth-aachen.de>
Mon, 15 Feb 2021 16:24:01 +0000 (17:24 +0100)
commitb4676b71c695a546de623d6da592e9fc50b7265f
tree78ec1d01a2d2b68cb52bdf9d5c45011be1ffa53a
parentb351afb9e1aa845af98a38c46ebf5767c47c2d72
[FileItemRolesUpdater] Fix calculation of requested indexes

In case the last and/or first page (a page being n=m_maximumVisibleItems
items) overlapped the already inserted items, one item for each range
would be inserted a second time, e.g. for the first page and last page:

`beginExtendedVisibleRange == 0` => `endFirstPage := 0` => `0 <= 0` is
inserted again.

`count == 100; endExtendedVisibleRange == 99; m_maximumVisibleItems == 20`
=> `beginLastPage := 99` => `99 < 100` is inserted again.
src/kitemviews/kfileitemmodelrolesupdater.cpp