diff --git a/makespec/BUILDVERSION b/makespec/BUILDVERSION index a817176f..0ddd619c 100644 --- a/makespec/BUILDVERSION +++ b/makespec/BUILDVERSION @@ -1 +1 @@ -216 +217 diff --git a/src/core/contest.cpp b/src/core/contest.cpp index 4b92fbca..c9553a96 100644 --- a/src/core/contest.cpp +++ b/src/core/contest.cpp @@ -176,8 +176,8 @@ void Contest::judge(const QVector> &judgingTasks) { TaskJudger *taskJudger = new TaskJudger(); connect(taskJudger, &TaskJudger::singleCaseFinished, this, &Contest::singleCaseFinished); connect(taskJudger, &TaskJudger::compileError, this, &Contest::compileError); - connect(taskJudger, &TaskJudger::taskJudgingStarted, - [this](QString x) { emit taskJudgingStarted(x); }); + connect(taskJudger, &TaskJudger::judgingStarted, this, &Contest::taskJudgingStarted); + connect(taskJudger, &TaskJudger::judgingFinished, this, &Contest::taskJudgingFinished); taskJudger->setTask(taskList[i]); taskJudger->setTaskId(i); taskJudger->setSettings(settings); @@ -203,7 +203,7 @@ void Contest::judge(const QVector> &judgingTasks) { delete eventLoop; delete controller; controller = nullptr; - emit contestantJudgingFinished(); + // emit contestantJudgingFinished(); } void Contest::judge(const QList>> &list) { diff --git a/src/core/judgingcontroller.cpp b/src/core/judgingcontroller.cpp index 356bf070..8a38392d 100644 --- a/src/core/judgingcontroller.cpp +++ b/src/core/judgingcontroller.cpp @@ -27,7 +27,7 @@ void JudgingController::assign() { auto *taskJudger = queuingTasks.front(); queuingTasks.pop_front(); taskJudger->moveToThread(thread); - connect(taskJudger, &TaskJudger::judgeFinished, this, &JudgingController::taskFinished); + connect(taskJudger, &TaskJudger::judgingFinished, this, &JudgingController::taskFinished); runningTasks[taskJudger] = thread; thread->start(); QMetaObject::invokeMethod(taskJudger, &TaskJudger::judgeIt); diff --git a/src/core/taskjudger.cpp b/src/core/taskjudger.cpp index 01b4003d..f2d72e22 100644 --- a/src/core/taskjudger.cpp +++ b/src/core/taskjudger.cpp @@ -330,7 +330,7 @@ auto TaskJudger::traditionalTaskPrepare() -> bool { void TaskJudger::judgeIt() { qDebug() << "Start Judging"; - emit taskJudgingStarted(task->getProblemTitle()); + emit judgingStarted(task->getProblemTitle()); if (judge()) { contestant->setCheckJudged(taskId, true); contestant->setCompileMessage(taskId, compileMessage); @@ -345,7 +345,7 @@ void TaskJudger::judgeIt() { } else { contestant->setCheckJudged(taskId, false); } - emit judgeFinished(); + emit judgingFinished(); } int TaskJudger::judge() { diff --git a/src/core/taskjudger.h b/src/core/taskjudger.h index 5ffe2ae9..fc832298 100644 --- a/src/core/taskjudger.h +++ b/src/core/taskjudger.h @@ -77,11 +77,11 @@ class TaskJudger : public QObject { public slots: void stop(); signals: - void taskJudgingStarted(QString); + void judgingStarted(QString); + void judgingFinished(); void dialogAlert(QString); void singleCaseFinished(int, int, int, int, int, int, int); void singleSubtaskDependenceFinished(int, int, int); void compileError(int, int); void stopJudgingSignal(); - void judgeFinished(); }; \ No newline at end of file