qt: make limit=0 behave limit=0 in `BaseModel`
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.
Showing
- modules/gui/qt/medialibrary/mlbasemodel.cpp 1 addition, 1 deletionmodules/gui/qt/medialibrary/mlbasemodel.cpp
- modules/gui/qt/util/base_model.cpp 2 additions, 2 deletionsmodules/gui/qt/util/base_model.cpp
- modules/gui/qt/util/base_model.hpp 5 additions, 4 deletionsmodules/gui/qt/util/base_model.hpp
- modules/gui/qt/util/base_model_p.hpp 1 addition, 1 deletionmodules/gui/qt/util/base_model_p.hpp
- modules/gui/qt/util/listcache.hpp 3 additions, 3 deletionsmodules/gui/qt/util/listcache.hpp
- modules/gui/qt/util/listcache.hxx 3 additions, 3 deletionsmodules/gui/qt/util/listcache.hxx
Loading
Please register or sign in to comment