From 80e6980d9e036d355ae67e857cd1f9a42f29118b Mon Sep 17 00:00:00 2001 From: Zii Date: Wed, 17 May 2023 19:40:09 +0000 Subject: [PATCH] Fixed a compile error. --- src/common.cpp | 7 +++---- src/common.h | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/common.cpp b/src/common.cpp index 8a8ff6d..2c0d258 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -217,10 +217,9 @@ void MultiInstance::instStderr() } } -void MultiInstance::procFinished(int exitCode, QProcess::ExitStatus exitStatus) +void MultiInstance::procChanged(QProcess::ProcessState newState) { - Q_UNUSED(exitCode) - Q_UNUSED(exitStatus) + Q_UNUSED(newState) for (auto &&proc : procList) { @@ -259,7 +258,7 @@ int MultiInstance::start(const QStringList &args) connect(proc, &QProcess::readyReadStandardOutput, this, &MultiInstance::instStdout); connect(proc, &QProcess::readyReadStandardError, this, &MultiInstance::instStderr); - connect(proc, &QProcess::finished, this, &MultiInstance::procFinished); + connect(proc, &QProcess::stateChanged, this, &MultiInstance::procChanged); connect(QCoreApplication::instance(), &QCoreApplication::aboutToQuit, proc, &QProcess::terminate); diff --git a/src/common.h b/src/common.h index 951a139..a4ed010 100644 --- a/src/common.h +++ b/src/common.h @@ -99,7 +99,7 @@ private slots: void instStdout(); void instStderr(); - void procFinished(int exitCode, QProcess::ExitStatus exitStatus); + void procChanged(QProcess::ProcessState newState); public: