| 211 | } |
| 212 | |
| 213 | void |
| 214 | MultitaskController::pushTask(CancellableTask *task, QString const &title) |
| 215 | { |
| 216 | CancellableTaskContext *ctx = new CancellableTaskContext(task, title); |
| 217 | |
| 218 | this->taskList.push_back(ctx); |
| 219 | this->reverseTaskMap[task] = ctx; |
| 220 | |
| 221 | // Faster than calling repopulateTaskVector() |
| 222 | this->taskVec.push_back(ctx); |
| 223 | ctx->assignIndex(this->taskVec.size() - 1); |
| 224 | |
| 225 | emit taskAdded(task); |
| 226 | |
| 227 | // Start after GUI has been notified |
| 228 | this->connectNewTask(task); |
| 229 | ctx->start(); |
| 230 | } |
| 231 | |
| 232 | void |
| 233 | MultitaskController::getTaskVector(QVector<CancellableTaskContext *> &vec) const |
no test coverage detected