26 #include <QMessageBox>
29 : mProcess( NULL ), mOutput( NULL )
41 connect(
mProcess, SIGNAL( error( QProcess::ProcessError ) ),
this, SLOT(
processError( QProcess::ProcessError ) ) );
47 connect(
mProcess, SIGNAL( finished(
int, QProcess::ExitStatus ) ),
this, SLOT(
processExit(
int, QProcess::ExitStatus ) ) );
57 QObject* mOutputObj =
dynamic_cast<QObject *
>(
mOutput );
60 connect( mOutputObj, SIGNAL( destroyed() ),
this, SLOT(
dialogGone() ) );
68 if ( !
mProcess->startDetached( action ) )
70 QMessageBox::critical( 0,
tr(
"Action" ),
71 tr(
"Unable to run command\n%1" ).arg( action ),
72 QMessageBox::Ok, Qt::NoButton );
93 QString line(
mProcess->readAllStandardOutput() );
101 QString line(
mProcess->readAllStandardError() );
138 disconnect(
mProcess, SIGNAL( error( QProcess::ProcessError ) ),
this, SLOT(
processError( QProcess::ProcessError ) ) );
141 disconnect(
mProcess, SIGNAL( finished(
int, QProcess::ExitStatus ) ),
this, SLOT(
processExit(
int, QProcess::ExitStatus ) ) );
148 if ( err == QProcess::FailedToStart )
157 QgsDebugMsg(
"Got error: " + QString(
"%d" ).arg( err ) );