diff options
| author | Christian Kandeler <christian.kandeler@digia.com> | 2013-06-14 10:57:38 +0200 |
|---|---|---|
| committer | Joerg Bornemann <joerg.bornemann@digia.com> | 2013-06-18 10:57:25 +0200 |
| commit | b1d926024ddded2a43cc182c2d97839bb528def4 (patch) | |
| tree | fe9992446242f7aa25fe1e8c2e8875b8da86dbfe /src/lib/buildgraph/processcommandexecutor.cpp | |
| parent | 1d5c5e16a582401f5d1af299f95b57936db84593 (diff) | |
| download | qbs-b1d926024ddded2a43cc182c2d97839bb528def4.tar.gz | |
Some minor improvements to the Error class.
- Rename "Error" to "ErrorInfo", to make clear that this class conveys
information about errors, including that there might not actually be
one.
- Rename "ErrorData" to "ErrorItem", to make clear that these are parts
of an aggregate structure.
- Introduce ErrorInfo::hasError() for quick checking of whether an error
occurred.
Change-Id: Icea6ed5240d6d14bd30e9cea189c6babd7004792
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'src/lib/buildgraph/processcommandexecutor.cpp')
| -rw-r--r-- | src/lib/buildgraph/processcommandexecutor.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/buildgraph/processcommandexecutor.cpp b/src/lib/buildgraph/processcommandexecutor.cpp index 466ea5146..78f77c381 100644 --- a/src/lib/buildgraph/processcommandexecutor.cpp +++ b/src/lib/buildgraph/processcommandexecutor.cpp @@ -134,7 +134,7 @@ void ProcessCommandExecutor::doStart() responseFile.setAutoRemove(false); responseFile.setFileTemplate(QDir::tempPath() + "/qbsresp"); if (!responseFile.open()) { - emit error(Error(Tr::tr("Cannot create response file '%1'.") + emit error(ErrorInfo(Tr::tr("Cannot create response file '%1'.") .arg(responseFile.fileName()))); return; } @@ -174,7 +174,7 @@ QString ProcessCommandExecutor::filterProcessOutput(const QByteArray &_output, QScriptValue filterFunction = scriptEngine()->evaluate("var f = " + filterFunctionSource + "; f"); if (!filterFunction.isFunction()) { - emit error(Error(Tr::tr("Error in filter function: %1.\n%2") + emit error(ErrorInfo(Tr::tr("Error in filter function: %1.\n%2") .arg(filterFunctionSource, filterFunction.toString()))); return output; } @@ -183,7 +183,7 @@ QString ProcessCommandExecutor::filterProcessOutput(const QByteArray &_output, outputArg.setProperty(0, scriptEngine()->toScriptValue(output)); QScriptValue filteredOutput = filterFunction.call(scriptEngine()->undefinedValue(), outputArg); if (filteredOutput.isError()) { - emit error(Error(Tr::tr("Error when calling output filter function: %1") + emit error(ErrorInfo(Tr::tr("Error when calling output filter function: %1") .arg(filteredOutput.toString()))); return output; } @@ -248,7 +248,7 @@ void ProcessCommandExecutor::onProcessError() errorMessage = Tr::tr("Unknown process error running '%1'.").arg(binary); break; } - emit error(Error(errorMessage)); + emit error(ErrorInfo(errorMessage)); } void ProcessCommandExecutor::onProcessFinished(int exitCode) @@ -258,7 +258,7 @@ void ProcessCommandExecutor::onProcessFinished(int exitCode) sendProcessOutput(!errorOccurred); if (Q_UNLIKELY(errorOccurred)) { - emit error(Error(Tr::tr("Process failed with exit code %1.").arg(exitCode))); + emit error(ErrorInfo(Tr::tr("Process failed with exit code %1.").arg(exitCode))); return; } |
