MCPcopy Create free account
hub / github.com/KDE/kdevelop / childProcessError

Method childProcessError

kdevplatform/outputview/outputexecutejob.cpp:319–364  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

317}
318
319void OutputExecuteJob::childProcessError( QProcess::ProcessError processError )
320{
321 Q_D(OutputExecuteJob);
322
323 // This can be called twice: one time via an error() signal, and second - from childProcessExited().
324 // Avoid doing things in second time.
325 if( d->m_status != OutputExecuteJob::JobRunning )
326 return;
327 d->m_status = OutputExecuteJob::JobFailed;
328
329 qCWarning(OUTPUTVIEW) << "process error:" << processError << d->m_process->errorString()
330 << ", the command line:" << d->joinCommandLine();
331
332 QString errorValue;
333 switch( processError ) {
334 case QProcess::FailedToStart:
335 errorValue = i18n("%1 has failed to start", commandLine().at(0));
336 break;
337
338 case QProcess::Crashed:
339 errorValue = i18n("%1 has crashed", commandLine().at(0));
340 break;
341
342 case QProcess::ReadError:
343 errorValue = i18n("Read error");
344 break;
345
346 case QProcess::WriteError:
347 errorValue = i18n("Write error");
348 break;
349
350 case QProcess::Timedout:
351 errorValue = i18n("Waiting for the process has timed out");
352 break;
353
354 case QProcess::UnknownError:
355 errorValue = i18n("Exit code %1", d->m_process->exitCode());
356 break;
357 }
358
359 setError( FailedShownError );
360 setErrorText( errorValue );
361 d->m_lineMaker->flushBuffers();
362 model()->appendLine( i18n("*** Failure: %1 ***", errorValue) );
363 emitResult();
364}
365
366void OutputExecuteJob::childProcessExited( int exitCode, QProcess::ExitStatus exitStatus )
367{

Callers

nothing calls this directly

Calls 6

modelFunction · 0.85
joinCommandLineMethod · 0.80
flushBuffersMethod · 0.80
errorStringMethod · 0.45
atMethod · 0.45
appendLineMethod · 0.45

Tested by

no test coverage detected