1
0
Fork 0
mirror of https://github.com/HenkKalkwater/harbour-sailfin.git synced 2026-05-19 10:35:16 +00:00

Fix a few bugs regarding loaders and models

* Properly keep track of the current offset and total recourd count in
  models.
* Catch exceptions and store them in errorString properties wherever
  applicable in loaders.
This commit is contained in:
Chris Josten 2021-08-23 01:48:35 +02:00
parent 1aae311b9b
commit 5ee2869db9
5 changed files with 77 additions and 36 deletions

View file

@ -141,6 +141,29 @@ bool setRequestStartIndex(Loader::GetLatestMediaParams &params, int offset) {
return false;
}
template<>
void setRequestLimit(Loader::GetItemsByUserIdParams &params, int limit) {
params.setLimit(limit);
}
template<>
bool setRequestStartIndex(Loader::GetItemsByUserIdParams &params, int index) {
params.setLimit(index);
return true;
}
template<>
void setRequestLimit(Loader::GetResumeItemsParams &params, int limit) {
params.setLimit(limit);
}
template<>
bool setRequestStartIndex(Loader::GetResumeItemsParams &params, int index) {
params.setLimit(index);
return true;
}
template<>
QList<DTO::UserDto> extractRecords(const QList<DTO::UserDto> &result) {
return result;