[QGIS Commit] r10599 - branches/Version-1_0/src/core

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sun Apr 19 06:33:52 EDT 2009


Author: jef
Date: 2009-04-19 06:33:52 -0400 (Sun, 19 Apr 2009)
New Revision: 10599

Modified:
   branches/Version-1_0/src/core/qgsrunprocess.cpp
Log:
merge r10533 to version 1.0

Modified: branches/Version-1_0/src/core/qgsrunprocess.cpp
===================================================================
--- branches/Version-1_0/src/core/qgsrunprocess.cpp	2009-04-19 10:30:28 UTC (rev 10598)
+++ branches/Version-1_0/src/core/qgsrunprocess.cpp	2009-04-19 10:33:52 UTC (rev 10599)
@@ -47,9 +47,6 @@
     // inside the capture if() statement.
     connect( mProcess, SIGNAL( finished( int, QProcess::ExitStatus ) ), this, SLOT( processExit( int, QProcess::ExitStatus ) ) );
 
-    // start the process!
-    mProcess->start( action );
-
     // Use QgsMessageOutput for displaying output to user
     // It will delete itself when the dialog box is closed.
     mOutput = QgsMessageOutput::createMessageOutput();
@@ -64,6 +61,9 @@
     {
       connect( mOutputObj, SIGNAL( destroyed() ), this, SLOT( dialogGone() ) );
     }
+
+    // start the process!
+    mProcess->start( action );
   }
   else
   {
@@ -134,6 +134,8 @@
   // class being called after it has been deleted (Qt seems not to be
   // disconnecting them itself)
 
+  mOutput = 0;
+
   disconnect( mProcess, SIGNAL( error( QProcess::ProcessError ) ), this, SLOT( processError( QProcess::ProcessError ) ) );
   disconnect( mProcess, SIGNAL( readyReadStandardOutput() ), this, SLOT( stdoutAvailable() ) );
   disconnect( mProcess, SIGNAL( readyReadStandardError() ), this, SLOT( stderrAvailable() ) );
@@ -146,7 +148,7 @@
 {
   if ( err == QProcess::FailedToStart )
   {
-    QgsMessageOutput* output = QgsMessageOutput::createMessageOutput();
+    QgsMessageOutput* output = mOutput ? mOutput : QgsMessageOutput::createMessageOutput();
     output->setMessage( tr( "Unable to run command" ) + mCommand, QgsMessageOutput::MessageText );
     // Didn't work, so no need to hang around
     die();



More information about the QGIS-commit mailing list