MCPcopy Create free account
hub / github.com/IJHack/QtPass / finished

Method finished

src/executor.cpp:347–368  ·  view source on GitHub ↗

* @brief Executor::finished called when an executed process finishes * @param exitCode * @param exitStatus */

Source from the content-addressed store, hash-verified

345 * @param exitStatus
346 */
347void 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}

Callers

nothing calls this directly

Calls 1

decodeAssumingUtf8Function · 0.85

Tested by

no test coverage detected