Executes external commands for handleing password, git and other data.
More...
#include <executor.h>
|
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
|
|
void | error (int id, int exitCode, const QString &output, const QString &errout) |
| error signal that is emited when process finishes with an error
|
|
|
| Executor (QObject *parent=0) |
| Executor::Executor executes external applications.
|
|
void | execute (int id, const QString &app, const QStringList &args, bool readStdout, bool readStderr=true) |
| Executor::execute execute an app.
|
|
void | execute (int id, const QString &workDir, const QString &app, const QStringList &args, bool readStdout, bool readStderr=true) |
| Executor::execute executes an app from a workDir.
|
|
void | execute (int id, const QString &app, const QStringList &args, QString input=QString(), bool readStdout=false, bool readStderr=true) |
| Executor::execute an app, takes input and presents it as stdin.
|
|
void | execute (int id, const QString &workDir, const QString &app, const QStringList &args, QString input=QString(), bool readStdout=false, bool readStderr=true) |
| Executor::execute executes an app from a workDir, takes input and presents it as stdin.
|
|
void | setEnvironment (const QStringList &env) |
| Executor::setEnvironment set environment variables for executor processes.
|
|
int | cancelNext () |
| Executor::cancelNext cancels execution of first process in queue if it's not already running.
|
|
|
static int | executeBlocking (QString app, const QStringList &args, QString input=QString(), QString *process_out=Q_NULLPTR, QString *process_err=Q_NULLPTR) |
| Executor::executeBlocking blocking version of the executor, takes input and presents it as stdin.
|
|
static int | executeBlocking (QString app, const QStringList &args, QString *process_out, QString *process_err=Q_NULLPTR) |
| Executor::executeBlocking blocking version of the executor.
|
|
Executes external commands for handleing password, git and other data.
Definition at line 12 of file executor.h.
◆ Executor()
Executor::Executor |
( |
QObject * |
parent = 0 | ) |
|
|
explicit |
◆ cancelNext()
int Executor::cancelNext |
( |
| ) |
|
Executor::cancelNext cancels execution of first process in queue if it's not already running.
- Returns
- id of the cancelled process or -1 on error
Definition at line 233 of file executor.cpp.
◆ error
void Executor::error |
( |
int |
id, |
|
|
int |
exitCode, |
|
|
const QString & |
output, |
|
|
const QString & |
errout |
|
) |
| |
|
signal |
error signal that is emited when process finishes with an error
- Parameters
-
id | id of the process |
exitCode | return code of the process |
output | stdout produced by the process |
errout | stderr produced by the process |
◆ execute() [1/4]
void Executor::execute |
( |
int |
id, |
|
|
const QString & |
app, |
|
|
const QStringList & |
args, |
|
|
bool |
readStdout, |
|
|
bool |
readStderr = true |
|
) |
| |
◆ execute() [2/4]
void Executor::execute |
( |
int |
id, |
|
|
const QString & |
app, |
|
|
const QStringList & |
args, |
|
|
QString |
input = QString() , |
|
|
bool |
readStdout = false , |
|
|
bool |
readStderr = true |
|
) |
| |
Executor::execute an app, takes input and presents it as stdin.
- Parameters
-
id | |
app | |
args | |
input | |
readStdout | |
readStderr | |
Definition at line 97 of file executor.cpp.
◆ execute() [3/4]
void Executor::execute |
( |
int |
id, |
|
|
const QString & |
workDir, |
|
|
const QString & |
app, |
|
|
const QStringList & |
args, |
|
|
bool |
readStdout, |
|
|
bool |
readStderr = true |
|
) |
| |
◆ execute() [4/4]
void Executor::execute |
( |
int |
id, |
|
|
const QString & |
workDir, |
|
|
const QString & |
app, |
|
|
const QStringList & |
args, |
|
|
QString |
input = QString() , |
|
|
bool |
readStdout = false , |
|
|
bool |
readStderr = true |
|
) |
| |
Executor::execute executes an app from a workDir, takes input and presents it as stdin.
- Parameters
-
id | |
workDir | |
app | |
args | |
input | |
readStdout | |
readStderr | |
Definition at line 113 of file executor.cpp.
◆ executeBlocking() [1/2]
int Executor::executeBlocking |
( |
QString |
app, |
|
|
const QStringList & |
args, |
|
|
QString * |
process_out, |
|
|
QString * |
process_err = Q_NULLPTR |
|
) |
| |
|
static |
◆ executeBlocking() [2/2]
int Executor::executeBlocking |
( |
QString |
app, |
|
|
const QStringList & |
args, |
|
|
QString |
input = QString() , |
|
|
QString * |
process_out = Q_NULLPTR , |
|
|
QString * |
process_err = Q_NULLPTR |
|
) |
| |
|
static |
Executor::executeBlocking blocking version of the executor, takes input and presents it as stdin.
- Parameters
-
app | |
args | |
input | |
process_out | |
process_err | |
- Returns
TODO(bezet): it might make sense to throw here, a lot of possible errors
Definition at line 171 of file executor.cpp.
◆ finished
void Executor::finished |
( |
int |
id, |
|
|
int |
exitCode, |
|
|
const QString & |
output, |
|
|
const QString & |
errout |
|
) |
| |
|
signal |
finished signal that is emited when process finishes
- Parameters
-
id | id of the process |
exitCode | return code of the process |
output | stdout produced by the process |
errout | stderr produced by the process |
◆ setEnvironment()
void Executor::setEnvironment |
( |
const QStringList & |
env | ) |
|
◆ starting
void Executor::starting |
( |
| ) |
|
|
signal |
starting signal that is emited when process starts
The documentation for this class was generated from the following files: