| 81 | } |
| 82 | |
| 83 | auto NetJob::abort() -> bool |
| 84 | { |
| 85 | bool fullyAborted = true; |
| 86 | |
| 87 | // fail all downloads on the queue |
| 88 | for (auto task : m_queue) |
| 89 | m_failed.insert(task.get(), task); |
| 90 | m_queue.clear(); |
| 91 | |
| 92 | // abort active downloads |
| 93 | auto toKill = m_doing.values(); |
| 94 | for (auto part : toKill) { |
| 95 | fullyAborted &= part->abort(); |
| 96 | } |
| 97 | |
| 98 | if (fullyAborted) |
| 99 | emitAborted(); |
| 100 | else |
| 101 | emitFailed(tr("Failed to abort all tasks in the NetJob!")); |
| 102 | |
| 103 | return fullyAborted; |
| 104 | } |
| 105 | |
| 106 | auto NetJob::getFailedActions() -> QList<NetAction*> |
| 107 | { |
no test coverage detected