21 struct execQueueItem {
55 QQueue<execQueueItem> m_execQueue;
61 explicit Executor(QObject *parent = 0);
63 void execute(
int id,
const QString &app,
const QStringList &args,
64 bool readStdout,
bool readStderr =
true);
66 void execute(
int id,
const QString &workDir,
const QString &app,
67 const QStringList &args,
bool readStdout,
68 bool readStderr =
true);
70 void execute(
int id,
const QString &app,
const QStringList &args,
71 QString input = QString(),
bool readStdout =
false,
72 bool readStderr =
true);
74 void execute(
int id,
const QString &workDir,
const QString &app,
75 const QStringList &args, QString input = QString(),
76 bool readStdout =
false,
bool readStderr =
true);
79 const QString &input = QString(),
80 QString *process_out =
nullptr,
81 QString *process_err =
nullptr) -> int;
85 QString *process_err =
nullptr) -> int;
91 void finished(
int exitCode, QProcess::ExitStatus exitStatus);
101 void finished(
int id,
int exitCode,
const QString &output,
102 const QString &errout);
116 void error(
int id,
int exitCode,
const QString &output,
117 const QString &errout);
Executes external commands for handleing password, git and other data.
static auto executeBlocking(QString app, const QStringList &args, const QString &input=QString(), QString *process_out=nullptr, QString *process_err=nullptr) -> int
Executor::executeBlocking blocking version of the executor, takes input and presents it as stdin.
void execute(int id, const QString &app, const QStringList &args, bool readStdout, bool readStderr=true)
Executor::execute execute an app.
void error(int id, int exitCode, const QString &output, const QString &errout)
error signal that is emited when process finishes with an error
void setEnvironment(const QStringList &env)
Executor::setEnvironment set environment variables for executor processes.
void finished(int id, int exitCode, const QString &output, const QString &errout)
finished signal that is emited when process finishes
void starting()
starting signal that is emited when process starts
auto cancelNext() -> int
Executor::cancelNext cancels execution of first process in queue if it's not already running.