| 154 | } |
| 155 | |
| 156 | void VcsEventLogModel::fetchMore(const QModelIndex& parent) |
| 157 | { |
| 158 | Q_D(VcsEventLogModel); |
| 159 | |
| 160 | d->fetching = true; |
| 161 | Q_ASSERT(!parent.isValid()); |
| 162 | Q_UNUSED(parent); |
| 163 | VcsJob* job = d->m_iface->log(d->m_url, d->m_rev, qMax(rowCount(), 100)); |
| 164 | connect(this, &VcsEventLogModel::destroyed, job, [this, job] { |
| 165 | job->disconnect(this); // ~VcsEventLogModel() has returned => cannot invoke jobReceivedResults() |
| 166 | job->kill(); |
| 167 | }); |
| 168 | connect(job, &VcsJob::finished, this, &VcsEventLogModel::jobReceivedResults); |
| 169 | ICore::self()->runController()->registerJob( job ); |
| 170 | } |
| 171 | |
| 172 | void VcsEventLogModel::jobReceivedResults(KJob* job) |
| 173 | { |
nothing calls this directly
no test coverage detected