Skip to content
Snippets Groups Projects

qt: limit=0 should mean limit=0 in `BaseModel`

Open Fatih Uzunoğlu requested to merge fuzun/vlc:qt/fixlimitzerobehavior into master

limit=0 having special value, such as loading all items is not intuitive. limit=0 should behave as limit is 0, as what it suggests.

Not only that but it also means we need two special values to (current case):

  • Not load any items. (any negative number?)
  • Load all items. (limit=0)

Where as if limit=0 behaves as limit=0, we need only one special value to load all items. I propose any arbitrary negative number.

The current situation also makes mapping more complicated, for example with a view that has a property itemCountToShow, we can not simply map limit: view.itemCountToShow, because when itemCountToShow is 0, this would cause the model to load all items.

I have previously mentioned about this peculiar behavior in the upcoming home page merge request where we suffer from this problem: !5890 (comment 475422), !5890 (comment 478733)

Request review @chub.

Merge request reports

Members who can merge are allowed to add commits.

Merge request pipeline #576988 passed

Merge request pipeline passed for cb7b46c0

Test coverage 17.96% from 1 job
Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading