Skip to content

Commit

Permalink
description update to QProcess
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5118 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek committed Mar 30, 2006
1 parent 069e8aa commit bddb316
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions src/plugins/grass/qgsgrassmodule.cpp
Expand Up @@ -294,24 +294,20 @@ QgsGrassModuleStandardOptions::QgsGrassModuleStandardOptions (
mXName = xname; mXName = xname;
mParent = parent; mParent = parent;


Q3Process *process = new Q3Process( this ); QProcess process( this );
process->addArgument( mXName ); process.start ( mXName, QStringList ( "--interface-description") );
process->addArgument( "--interface-description" );

// ? Does binary on Win need .exe extention ?
// Attention: if a binary has the .exe extention it must be // Return code 255 (-1) was correct in GRASS < 6.1.0
// also in mXName but we cannot append it here because if ( !process.waitForFinished()
// the modules can also be a script => ??? || (process.exitCode() != 0 && process.exitCode() != 255) )
// For now create in GISBASE/bin copy of each module without {
// .exe extension std::cerr << "process.exitCode() = " << process.exitCode() << std::endl;
if ( !process->start( ) ) {
QMessageBox::warning( 0, "Warning", "Cannot start module " + mXName ); QMessageBox::warning( 0, "Warning", "Cannot start module " + mXName );
return; return;
} }
while ( process->isRunning () ) { // TODO: check time, if it is not running too long QByteArray gDescArray = process.readAllStandardOutput();
} QByteArray errArray = process.readAllStandardError();
QByteArray gDescArray = process->readStdout();
QByteArray errArray = process->readStderr();
delete process;


QDomDocument gDoc ( "task" ); QDomDocument gDoc ( "task" );
QString err; QString err;
Expand Down

0 comments on commit bddb316

Please sign in to comment.