src/corelib/io/qprocess_symbian.cpp
changeset 19 fcece45ef507
parent 18 2f34d5167611
child 30 5dc02b23752f
--- a/src/corelib/io/qprocess_symbian.cpp	Fri Apr 16 15:50:13 2010 +0300
+++ b/src/corelib/io/qprocess_symbian.cpp	Mon May 03 13:17:34 2010 +0300
@@ -237,11 +237,15 @@
                 --i;
                 endQuote += QLatin1String("\\");
             }
-            commandLine += QLatin1String(" \"") + tmp.left(i) + endQuote;
+            commandLine += QLatin1String("\"") + tmp.left(i) + endQuote + QLatin1Char(' ');
         } else {
-            commandLine += QLatin1Char(' ') + tmp;
+            commandLine += tmp + QLatin1Char(' ');
         }
     }
+
+    // Chop the extra trailing space if any arguments were appended
+    if (arguments.size())
+        commandLine.chop(1);
 }
 
 static TInt qt_create_symbian_process(RProcess **proc, const QString &programName, const QStringList &arguments)
@@ -371,6 +375,7 @@
 // Called from ProcessManagerThread
 QProcessActive::~QProcessActive()
 {
+    Cancel();
     process = NULL;
     pproc = NULL;
 }
@@ -477,6 +482,7 @@
 // Called from ProcessManagerThread
 QProcessManagerMediator::~QProcessManagerMediator()
 {
+    Cancel();
     processManagerThread.Close();
     currentCommand = ENoCommand;
     currentObserver = NULL;