void KUiServerJobTracker::Private::_k_killJob() { org::kde::JobViewV2 *jobView = qobject_cast<org::kde::JobViewV2*>(q->sender()); if (jobView) { KJob *job = progressJobView.key(jobView); if (job) job->kill(KJob::EmitResult); } }
ThumbnailLoadJob::~ThumbnailLoadJob() { LOG(this); if (hasSubjobs()) { LOG("Killing subjob"); KJob* job = subjobs().first(); job->kill(); removeSubjob(job); } mThumbnailThread.cancel(); mThumbnailThread.wait(); if (!sThumbnailCache->isRunning()) { sThumbnailCache->start(); } }
void ThumbnailLoadJob::removeItems(const KFileItemList& itemList) { Q_FOREACH(const KFileItem & item, itemList) { // If we are removing the next item, update to be the item after or the // first if we removed the last item mItems.removeAll(item); if (item == mCurrentItem) { // Abort current item mCurrentItem = KFileItem(); if (hasSubjobs()) { KJob* job = subjobs().first(); job->kill(); removeSubjob(job); } } }