diff options
author | Christian Kandeler <christian.kandeler@digia.com> | 2014-04-10 12:59:32 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@digia.com> | 2014-04-15 12:20:16 +0200 |
commit | 9553d270d18f1f5e0be838a750a8443d8218ff9e (patch) | |
tree | c976749d3d00e54a624421b0a9159af21f8c3646 /src/lib/corelib/buildgraph/executorjob.h | |
parent | 0428fa446c3db835cadf6cbe6e9237bb27073403 (diff) |
Sanitize error/finished handling in executor jobs and command executors.
The classes as they are now specify different signals for signaling
failure and finishing. Some of these error() signals are followed by a
finished() signal, others are not, which is just asking for trouble.
Under certain circumstances there can also be several error() signals
for one and the same process. In fact, there is almost certainly a race
condition there regarding executor job re-use.
This patch changes the design so that there is always exactly one
finished() signal that carries an error status. For some non-fatal
problems that higher-level code cannot sensibly handle, we now log a
warning instead of emitting an error signal.
Change-Id: I9e3df11564e7337ad766ca0d009303367d43c4ec
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'src/lib/corelib/buildgraph/executorjob.h')
-rw-r--r-- | src/lib/corelib/buildgraph/executorjob.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/corelib/buildgraph/executorjob.h b/src/lib/corelib/buildgraph/executorjob.h index dee7080b8..a6e4d1674 100644 --- a/src/lib/corelib/buildgraph/executorjob.h +++ b/src/lib/corelib/buildgraph/executorjob.h @@ -64,13 +64,11 @@ public: signals: void reportCommandDescription(const QString &highlight, const QString &message); void reportProcessResult(const qbs::ProcessResult &result); - void error(const qbs::ErrorInfo &error); - void success(); + void finished(const qbs::ErrorInfo &error = ErrorInfo()); // !hasError() <=> command successful private slots: void runNextCommand(); - void onCommandError(const qbs::ErrorInfo &err); - void onCommandFinished(); + void onCommandFinished(const qbs::ErrorInfo &err); private: void setFinished(); |