1
0
Fork 0
mirror of https://github.com/HenkKalkwater/harbour-sailfin.git synced 2024-11-21 16:55:17 +00:00

Merge pull request #20 from heartfin/19-collections-with-more-than-100-items-loop-back

setRequestStartIndex: actually set start index
This commit is contained in:
Chris Josten 2022-07-23 00:42:15 +02:00 committed by GitHub
commit ade8866303
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 2 deletions

View file

@ -251,6 +251,8 @@ extern template void setRequestLimit(Loader::GetResumeItemsParams &params, int l
extern template bool setRequestStartIndex(Loader::GetResumeItemsParams &params, int offset);
extern template void setRequestLimit(Loader::GetPublicUsersParams &params, int limit);
extern template bool setRequestStartIndex(Loader::GetPublicUsersParams &params, int offset);
extern template void setRequestLimit(Loader::GetNextUpParams &params, int limit);
extern template bool setRequestStartIndex(Loader::GetNextUpParams &params, int offset);
extern template QList<DTO::UserDto> extractRecords(const QList<DTO::UserDto> &result);
extern template int extractTotalRecordCount(const QList<DTO::UserDto> &result);

View file

@ -150,7 +150,7 @@ void setRequestLimit(Loader::GetItemsByUserIdParams &params, int limit) {
template<>
bool setRequestStartIndex(Loader::GetItemsByUserIdParams &params, int index) {
params.setLimit(index);
params.setStartIndex(index);
return true;
}
@ -161,7 +161,7 @@ void setRequestLimit(Loader::GetResumeItemsParams &params, int limit) {
template<>
bool setRequestStartIndex(Loader::GetResumeItemsParams &params, int index) {
params.setLimit(index);
params.setStartIndex(index);
return true;
}
@ -174,6 +174,16 @@ bool setRequestStartIndex(Loader::GetPublicUsersParams &/*params*/, int /*offset
return false;
}
template<>
void setRequestLimit(Loader::GetNextUpParams &params, int limit) {
params.setLimit(limit);
}
template<>
bool setRequestStartIndex(Loader::GetNextUpParams &params, int offset) {
params.setStartIndex(offset);
return true;
}
template<>
QList<DTO::UserDto> extractRecords(const QList<DTO::UserDto> &result) {
return result;