mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-27 03:58:46 +02:00
QProcess signals connected.
This commit is contained in:
parent
e191c65290
commit
9247e8dc16
4 changed files with 21 additions and 12 deletions
|
@ -242,8 +242,11 @@ void AssignmentClientMonitor::spawnChildClient() {
|
||||||
if (assignmentClient->processId() > 0) {
|
if (assignmentClient->processId() > 0) {
|
||||||
auto pid = assignmentClient->processId();
|
auto pid = assignmentClient->processId();
|
||||||
// make sure we hear that this process has finished when it does
|
// make sure we hear that this process has finished when it does
|
||||||
connect(assignmentClient, static_cast<void(QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished),
|
connect(
|
||||||
this, [this, pid](int exitCode, QProcess::ExitStatus exitStatus) {
|
assignmentClient,
|
||||||
|
static_cast<void(QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished),
|
||||||
|
this,
|
||||||
|
[this, pid](int exitCode, QProcess::ExitStatus exitStatus) {
|
||||||
childProcessFinished(pid, exitCode, exitStatus);
|
childProcessFinished(pid, exitCode, exitStatus);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -285,12 +285,17 @@ void TestRailInterface::createAddTestCasesPythonScript(const QString& testDirect
|
||||||
QString command("C:\\Python37\\python");
|
QString command("C:\\Python37\\python");
|
||||||
QStringList parameters = QStringList() << outputDirectory + "/addTestCases.py";
|
QStringList parameters = QStringList() << outputDirectory + "/addTestCases.py";
|
||||||
QProcess* process = new QProcess();
|
QProcess* process = new QProcess();
|
||||||
if (process->startDetached(command, parameters)) {
|
connect(
|
||||||
QMessageBox::information(0, "Python process started", "TestRail is being updated");
|
process, &QProcess::started,
|
||||||
} else {
|
this, []() {QMessageBox::information(0, "Python process started", "TestRail is being updated"); }
|
||||||
QMessageBox::critical(0, "Failure", "Could not start process to update TestRail");
|
);
|
||||||
return;
|
|
||||||
}
|
connect(
|
||||||
|
process, static_cast<void(QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished),
|
||||||
|
this, [](int exitCode, QProcess::ExitStatus exitStatus) {QMessageBox::information(0, "Python process finished", "TestRail tests have been added"); }
|
||||||
|
);
|
||||||
|
|
||||||
|
process->start(command, parameters);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,9 @@
|
||||||
#include <QtXml/QDomDocument>
|
#include <QtXml/QDomDocument>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
class TestRailInterface {
|
class TestRailInterface : public QObject{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TestRailInterface();
|
TestRailInterface();
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,7 @@
|
||||||
|
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
|
|
||||||
class MismatchWindow : public QDialog, public Ui::MismatchWindow
|
class MismatchWindow : public QDialog, public Ui::MismatchWindow {
|
||||||
{
|
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
Loading…
Reference in a new issue