Skip to content

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

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

Loading