| 183 | |
| 184 | |
| 185 | void ScriptAppJob::processFinished( int exitCode , QProcess::ExitStatus status ) |
| 186 | { |
| 187 | lineMaker->flushBuffers(); |
| 188 | |
| 189 | if (exitCode == 0 && status == QProcess::NormalExit) { |
| 190 | appendLine( i18n("*** Exited normally ***") ); |
| 191 | } else if (status == QProcess::NormalExit) { |
| 192 | appendLine( i18n("*** Exited with return code: %1 ***", QString::number(exitCode)) ); |
| 193 | setError(OutputJob::FailedShownError); |
| 194 | } else if (error() == KJob::KilledJobError) { |
| 195 | appendLine( i18n("*** Process aborted ***") ); |
| 196 | setError(KJob::KilledJobError); |
| 197 | } else { |
| 198 | appendLine( i18n("*** Crashed with return code: %1 ***", QString::number(exitCode)) ); |
| 199 | setError(OutputJob::FailedShownError); |
| 200 | } |
| 201 | qCDebug(PLUGIN_EXECUTESCRIPT) << "Process done"; |
| 202 | emitResult(); |
| 203 | } |
| 204 | |
| 205 | void ScriptAppJob::processError( QProcess::ProcessError error ) |
| 206 | { |
nothing calls this directly
no test coverage detected