| 91 | } |
| 92 | |
| 93 | void CaptureListModel::fetchMore(const QModelIndex &) |
| 94 | { |
| 95 | QList<AnimeImage> moreCaptures; |
| 96 | hasMoreCaptures=false; |
| 97 | emit fetching(true); |
| 98 | AnimeWorker::instance()->fetchCaptures(animeName, moreCaptures, currentOffset, limitCount); |
| 99 | if (moreCaptures.count() > 0) |
| 100 | { |
| 101 | hasMoreCaptures=(moreCaptures.count()==limitCount); |
| 102 | beginInsertRows(QModelIndex(),captureList.count(),captureList.count()+moreCaptures.count()-1); |
| 103 | captureList.append(moreCaptures); |
| 104 | endInsertRows(); |
| 105 | currentOffset+=moreCaptures.count(); |
| 106 | } |
| 107 | emit fetching(false); |
| 108 | } |
| 109 | |
| 110 | Qt::ItemFlags CaptureListModel::flags(const QModelIndex &index) const |
| 111 | { |
nothing calls this directly
no test coverage detected