diff --git a/assignment-client/src/AssignmentClientMonitor.cpp b/assignment-client/src/AssignmentClientMonitor.cpp index 2847d4ebf1..6a9826f877 100644 --- a/assignment-client/src/AssignmentClientMonitor.cpp +++ b/assignment-client/src/AssignmentClientMonitor.cpp @@ -242,8 +242,11 @@ void AssignmentClientMonitor::spawnChildClient() { if (assignmentClient->processId() > 0) { auto pid = assignmentClient->processId(); // make sure we hear that this process has finished when it does - connect(assignmentClient, static_cast(&QProcess::finished), - this, [this, pid](int exitCode, QProcess::ExitStatus exitStatus) { + connect( + assignmentClient, + static_cast(&QProcess::finished), + this, + [this, pid](int exitCode, QProcess::ExitStatus exitStatus) { childProcessFinished(pid, exitCode, exitStatus); }); diff --git a/tools/auto-tester/src/TestRailInterface.cpp b/tools/auto-tester/src/TestRailInterface.cpp index 2439623d6d..26c2b69896 100644 --- a/tools/auto-tester/src/TestRailInterface.cpp +++ b/tools/auto-tester/src/TestRailInterface.cpp @@ -285,12 +285,17 @@ void TestRailInterface::createAddTestCasesPythonScript(const QString& testDirect QString command("C:\\Python37\\python"); QStringList parameters = QStringList() << outputDirectory + "/addTestCases.py"; QProcess* process = new QProcess(); - if (process->startDetached(command, parameters)) { - QMessageBox::information(0, "Python process started", "TestRail is being updated"); - } else { - QMessageBox::critical(0, "Failure", "Could not start process to update TestRail"); - return; - } + connect( + process, &QProcess::started, + this, []() {QMessageBox::information(0, "Python process started", "TestRail is being updated"); } + ); + + connect( + process, static_cast(&QProcess::finished), + this, [](int exitCode, QProcess::ExitStatus exitStatus) {QMessageBox::information(0, "Python process finished", "TestRail tests have been added"); } + ); + + process->start(command, parameters); } } @@ -545,4 +550,4 @@ void TestRailInterface::processTestPython(const QString& fullDirectory, << "}\n"; stream << "case = client.send_post('add_case/' + str(section_id), data)\n"; -} \ No newline at end of file +} diff --git a/tools/auto-tester/src/TestRailInterface.h b/tools/auto-tester/src/TestRailInterface.h index 768de24ea3..2d7ca21f58 100644 --- a/tools/auto-tester/src/TestRailInterface.h +++ b/tools/auto-tester/src/TestRailInterface.h @@ -16,7 +16,9 @@ #include #include -class TestRailInterface { +class TestRailInterface : public QObject{ + Q_OBJECT + public: TestRailInterface(); diff --git a/tools/auto-tester/src/ui/MismatchWindow.h b/tools/auto-tester/src/ui/MismatchWindow.h index 30fca94469..f203a2be6a 100644 --- a/tools/auto-tester/src/ui/MismatchWindow.h +++ b/tools/auto-tester/src/ui/MismatchWindow.h @@ -14,8 +14,7 @@ #include "../common.h" -class MismatchWindow : public QDialog, public Ui::MismatchWindow -{ +class MismatchWindow : public QDialog, public Ui::MismatchWindow { Q_OBJECT public: