Fix for msys shell not launching due to spaces in paths / filenames

git-svn-id: http://svn.osgeo.org/qgis/trunk@6187 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
timlinux 2006-12-05 13:10:17 +00:00
parent 8eae1062fe
commit f8fb7694bc

View File

@ -211,7 +211,8 @@ void QgsGrassTools::moduleClicked( Q3ListViewItem * item )
// Note: I was not able to run cmd.exe and command.com
// with QProcess
QString msysPath = mAppDir + "/msys/msys.bat";
QString msysPath = mAppDir + "/msys/bin/rxvt.exe";
QString myArguments = "-backspacekey ^H -sl 2500 -fg white -bg black -sr -fn Courier-16 -tn msys -geometry 80x25 -e /bin/sh --login -i";
QFile file ( msysPath );
if ( !file.exists() )
@ -222,7 +223,9 @@ void QgsGrassTools::moduleClicked( Q3ListViewItem * item )
else
{
QProcess *proc = new QProcess(this);
proc->start (msysPath);
//allow msys to exist in a path with spaces
msysPath = "\"" + msysPath + "\"" ;
proc->start(msysPath + " " + myArguments);
proc->waitForStarted();
if ( proc->state() != QProcess::Running )
{