* @brief Executor::finished called when an executed process finishes * @param exitCode * @param exitStatus */
| 345 | * @param exitStatus |
| 346 | */ |
| 347 | void Executor::finished(int exitCode, QProcess::ExitStatus exitStatus) { |
| 348 | execQueueItem i = m_execQueue.dequeue(); |
| 349 | running = false; |
| 350 | if (exitStatus == QProcess::NormalExit) { |
| 351 | QString output; |
| 352 | QString err; |
| 353 | if (i.readStdout) { |
| 354 | output = decodeAssumingUtf8(m_process.readAllStandardOutput()); |
| 355 | } |
| 356 | if (i.readStderr || exitCode != 0) { |
| 357 | err = decodeAssumingUtf8(m_process.readAllStandardError()); |
| 358 | if (exitCode != 0) { |
| 359 | #ifdef QT_DEBUG |
| 360 | dbg() << exitCode << err; |
| 361 | #endif |
| 362 | } |
| 363 | } |
| 364 | emit finished(i.id, exitCode, output, err); |
| 365 | } |
| 366 | // else: emit crashed with ID, which may give a chance to recover ? |
| 367 | executeNext(); |
| 368 | } |
nothing calls this directly
no test coverage detected