Fix for ticket #744 (crash associated with actions).

git-svn-id: http://svn.osgeo.org/qgis/trunk@7110 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
g_j_m 2007-07-28 22:48:43 +00:00
parent a1784bb028
commit 09b7ac7c58

View File

@ -126,7 +126,15 @@ void QgsRunProcess::dialogGone()
// The dialog has gone, so the user is no longer interested in the
// output from the process. Since the process will run happily
// without the QProcess object, this instance and its data can then
// go too.
// go too, but disconnect the signals to prevent further functions in this
// class being called after it has been deleted (Qt seems not to be
// disconnecting them itself)
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()));
disconnect(mProcess, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(processExit(int,QProcess::ExitStatus)));
die();
}