1#ifndef PROCESS_RUNNER_HPP
2#define PROCESS_RUNNER_HPP
28 const QStringList &arguments,
31 QString processName =
"process");
44 void finished(
int exitCode, QProcess::ExitStatus exitStatus);
75 void onProcessFinished(
int exitCode, QProcess::ExitStatus exitStatus);
80 void onReadyReadStandardOutput();
85 void onReadyReadStandardError();
96 QStringList arguments;
Manages the execution of an external process with a timeout.
Definition process_runner.hpp:15
void finished(int exitCode, QProcess::ExitStatus exitStatus)
Signal emitted when the process finishes.
ProcessRunner(const QString &program, const QStringList &arguments, int timeoutSeconds, QObject *parent=nullptr, QString processName="process")
Constructs a ProcessRunner object.
Definition process_runner.cpp:10
void errorReady(const QString &error)
Signal emitted when the process produces an error.
void forceStop()
Forces the stop of the running process.
Definition process_runner.cpp:35
void outputReady(const QString &output)
Signal emitted when the process produces output.
void timeout()
Signal emitted when the process times out.
void start()
Starts the execution of the process.
Definition process_runner.cpp:25