Introduce ExitCodeInterpreter, useful when exit code != 0 is valid

Task-number: QTCREATORBUG-10207

Change-Id: I3b440d40a968f09afc613b686ee50da6465ad88e
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
jkobus
2013-09-24 16:40:10 +02:00
committed by Jarek Kobus
parent 005bef9295
commit 696b0a8b80
8 changed files with 106 additions and 25 deletions

View File

@@ -77,8 +77,8 @@ public:
const QProcessEnvironment &environment);
~Command();
void addJob(const QStringList &arguments);
void addJob(const QStringList &arguments, int timeout);
void addJob(const QStringList &arguments, Utils::ExitCodeInterpreter *interpreter = 0);
void addJob(const QStringList &arguments, int timeout, Utils::ExitCodeInterpreter *interpreter = 0);
void execute();
void terminate();
bool lastExecutionSuccess() const;
@@ -103,14 +103,16 @@ public:
void setProgressParser(ProgressParser *parser);
void setProgressiveOutput(bool progressive);
Utils::SynchronousProcessResponse runVcs(const QStringList &arguments, int timeoutMS);
Utils::SynchronousProcessResponse runVcs(const QStringList &arguments, int timeoutMS,
Utils::ExitCodeInterpreter *interpreter = 0);
// Make sure to not pass through the event loop at all:
bool runFullySynchronous(const QStringList &arguments, int timeoutMS,
QByteArray *outputData, QByteArray *errorData);
private:
void run(QFutureInterface<void> &future);
Utils::SynchronousProcessResponse runSynchronous(const QStringList &arguments, int timeoutMS);
Utils::SynchronousProcessResponse runSynchronous(const QStringList &arguments, int timeoutMS,
Utils::ExitCodeInterpreter *interpreter = 0);
private slots:
void bufferedOutput(const QString &text);