Skip to content

Commit

Permalink
feat: readd refreshing resultviewer after each single-task judging
Browse files Browse the repository at this point in the history
  • Loading branch information
alphagocc committed Mar 22, 2022
1 parent 3efbea5 commit f836797
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion makespec/BUILDVERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
216
217
6 changes: 3 additions & 3 deletions src/core/contest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ void Contest::judge(const QVector<std::pair<Contestant *, int>> &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);
Expand All @@ -203,7 +203,7 @@ void Contest::judge(const QVector<std::pair<Contestant *, int>> &judgingTasks) {
delete eventLoop;
delete controller;
controller = nullptr;
emit contestantJudgingFinished();
// emit contestantJudgingFinished();
}

void Contest::judge(const QList<std::pair<QString, QVector<int>>> &list) {
Expand Down
2 changes: 1 addition & 1 deletion src/core/judgingcontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/core/taskjudger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -345,7 +345,7 @@ void TaskJudger::judgeIt() {
} else {
contestant->setCheckJudged(taskId, false);
}
emit judgeFinished();
emit judgingFinished();
}

int TaskJudger::judge() {
Expand Down
4 changes: 2 additions & 2 deletions src/core/taskjudger.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
};

0 comments on commit f836797

Please sign in to comment.