| 34 | } |
| 35 | |
| 36 | void JudgingController::taskFinished() { |
| 37 | auto *taskJudger = qobject_cast<TaskJudger *>(sender()); |
| 38 | if (taskJudger == nullptr) { |
| 39 | return; |
| 40 | } |
| 41 | if (runningTasks.count(taskJudger)) { |
| 42 | auto *thread = runningTasks[taskJudger]; |
| 43 | thread->quit(); |
| 44 | thread->wait(); |
| 45 | delete thread; |
| 46 | runningTasks.remove(taskJudger); |
| 47 | delete taskJudger; |
| 48 | } |
| 49 | assign(); |
| 50 | if (runningTasks.empty()) { |
| 51 | isJudging = false; |
| 52 | emit judgeFinished(); |
| 53 | } |
| 54 | } |
| 55 | void JudgingController::start() { |
| 56 | if (queuingTasks.size() == 0) { |
| 57 | emit judgeFinished(); |
nothing calls this directly
no outgoing calls
no test coverage detected