27 #include <QMessageBox>
30 : mProcess( NULL ), mOutput( NULL )
42 connect(
mProcess, SIGNAL( error( QProcess::ProcessError ) ),
this, SLOT(
processError( QProcess::ProcessError ) ) );
48 connect(
mProcess, SIGNAL( finished(
int, QProcess::ExitStatus ) ),
this, SLOT(
processExit(
int, QProcess::ExitStatus ) ) );
58 QObject* mOutputObj =
dynamic_cast<QObject *
>(
mOutput );
61 connect( mOutputObj, SIGNAL( destroyed() ),
this, SLOT(
dialogGone() ) );
69 if ( !
mProcess->startDetached( action ) )
71 QMessageBox::critical( 0, tr(
"Action" ),
72 tr(
"Unable to run command\n%1" ).arg( action ),
73 QMessageBox::Ok, Qt::NoButton );
94 QString line(
mProcess->readAllStandardOutput() );
102 QString line(
mProcess->readAllStandardError() );
139 disconnect(
mProcess, SIGNAL( error( QProcess::ProcessError ) ),
this, SLOT(
processError( QProcess::ProcessError ) ) );
142 disconnect(
mProcess, SIGNAL( finished(
int, QProcess::ExitStatus ) ),
this, SLOT(
processExit(
int, QProcess::ExitStatus ) ) );
149 if ( err == QProcess::FailedToStart )
158 QgsDebugMsg(
"Got error: " + QString(
"%d" ).arg( err ) );