diff options
author | Christian Kandeler <christian.kandeler@digia.com> | 2014-05-26 13:56:50 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@digia.com> | 2014-05-26 14:25:51 +0200 |
commit | 483c6542aae3a2071534954c95b539fa9343d73c (patch) | |
tree | b3479dd9c68facbaf12ec4363f364539e911eaf3 /src/lib/corelib/buildgraph | |
parent | 479c4ab1ae1e68543846c9a0b1fa271ae80f9cd5 (diff) |
Fix repeated emission of the finished() signal in JsCommandExecutor.
This currently happens always if the command fails, resulting in an
assertion.
Change-Id: If3de00a2f0e7d89bd052a6ab74bf4237be82e913
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'src/lib/corelib/buildgraph')
-rw-r--r-- | src/lib/corelib/buildgraph/jscommandexecutor.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/corelib/buildgraph/jscommandexecutor.cpp b/src/lib/corelib/buildgraph/jscommandexecutor.cpp index e2d1e14e4..cc7eb715b 100644 --- a/src/lib/corelib/buildgraph/jscommandexecutor.cpp +++ b/src/lib/corelib/buildgraph/jscommandexecutor.cpp @@ -181,14 +181,14 @@ void JsCommandExecutor::onJavaScriptCommandFinished() { m_running = false; const JavaScriptCommandResult &result = m_objectInThread->result(); + ErrorInfo err; if (!result.success) { logger().qbsDebug() << "JS context:\n" << jsCommand()->properties(); logger().qbsDebug() << "JS code:\n" << jsCommand()->sourceCode(); - QString msg = tr("Error while executing JavaScriptCommand:\n"); - msg += result.errorMessage; - emit finished(ErrorInfo(msg, result.errorLocation)); + err.append(tr("Error while executing JavaScriptCommand:"), result.errorLocation); + err.append(result.errorMessage); } - emit finished(); + emit finished(err); } const JavaScriptCommand *JsCommandExecutor::jsCommand() const |