[QGIS Commit] r10533 - trunk/qgis/src/core
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Sat Apr 11 15:39:15 EDT 2009
Author: jef
Date: 2009-04-11 15:39:15 -0400 (Sat, 11 Apr 2009)
New Revision: 10533
Modified:
trunk/qgis/src/core/qgsrunprocess.cpp
Log:
fix #1203
Modified: trunk/qgis/src/core/qgsrunprocess.cpp
===================================================================
--- trunk/qgis/src/core/qgsrunprocess.cpp 2009-04-11 19:37:14 UTC (rev 10532)
+++ trunk/qgis/src/core/qgsrunprocess.cpp 2009-04-11 19:39:15 UTC (rev 10533)
@@ -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();
@@ -63,6 +60,9 @@
{
connect( mOutputObj, SIGNAL( destroyed() ), this, SLOT( dialogGone() ) );
}
+
+ // start the process!
+ mProcess->start( action );
}
else
{
@@ -133,6 +133,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() ) );
@@ -145,7 +147,7 @@
{
if ( err == QProcess::FailedToStart )
{
- QgsMessageOutput* output = QgsMessageOutput::createMessageOutput();
+ QgsMessageOutput* output = mOutput ? mOutput : QgsMessageOutput::createMessageOutput();
output->setMessage( tr( "Unable to run command %1" ).arg( mCommand ), QgsMessageOutput::MessageText );
// Didn't work, so no need to hang around
die();
More information about the QGIS-commit
mailing list