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/abstractcommandexecutor.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/abstractcommandexecutor.h')
-rw-r--r-- | src/lib/corelib/buildgraph/abstractcommandexecutor.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/corelib/buildgraph/abstractcommandexecutor.h b/src/lib/corelib/buildgraph/abstractcommandexecutor.h index 0abb5c137..a4f781d62 100644 --- a/src/lib/corelib/buildgraph/abstractcommandexecutor.h +++ b/src/lib/corelib/buildgraph/abstractcommandexecutor.h @@ -31,6 +31,7 @@ #define QBS_ABSTRACTCOMMANDEXECUTOR_H #include <logging/logger.h> +#include <tools/error.h> #include <QObject> @@ -58,8 +59,7 @@ public slots: signals: void reportCommandDescription(const QString &highlight, const QString &message); - void error(const qbs::ErrorInfo &err); - void finished(); + void finished(const qbs::ErrorInfo &err = ErrorInfo()); // !hasError() <=> command successful protected: const AbstractCommand *command() const { return m_command; } |