src/corelib/io/qprocess_symbian.cpp
changeset 19 fcece45ef507
parent 18 2f34d5167611
child 30 5dc02b23752f
equal deleted inserted replaced
18:2f34d5167611 19:fcece45ef507
   235             int i = tmp.length();
   235             int i = tmp.length();
   236             while (i > 0 && tmp.at(i - 1) == QLatin1Char('\\')) {
   236             while (i > 0 && tmp.at(i - 1) == QLatin1Char('\\')) {
   237                 --i;
   237                 --i;
   238                 endQuote += QLatin1String("\\");
   238                 endQuote += QLatin1String("\\");
   239             }
   239             }
   240             commandLine += QLatin1String(" \"") + tmp.left(i) + endQuote;
   240             commandLine += QLatin1String("\"") + tmp.left(i) + endQuote + QLatin1Char(' ');
   241         } else {
   241         } else {
   242             commandLine += QLatin1Char(' ') + tmp;
   242             commandLine += tmp + QLatin1Char(' ');
   243         }
   243         }
   244     }
   244     }
       
   245 
       
   246     // Chop the extra trailing space if any arguments were appended
       
   247     if (arguments.size())
       
   248         commandLine.chop(1);
   245 }
   249 }
   246 
   250 
   247 static TInt qt_create_symbian_process(RProcess **proc, const QString &programName, const QStringList &arguments)
   251 static TInt qt_create_symbian_process(RProcess **proc, const QString &programName, const QStringList &arguments)
   248 {
   252 {
   249     RProcess *newProc = NULL;
   253     RProcess *newProc = NULL;
   369 }
   373 }
   370 
   374 
   371 // Called from ProcessManagerThread
   375 // Called from ProcessManagerThread
   372 QProcessActive::~QProcessActive()
   376 QProcessActive::~QProcessActive()
   373 {
   377 {
       
   378     Cancel();
   374     process = NULL;
   379     process = NULL;
   375     pproc = NULL;
   380     pproc = NULL;
   376 }
   381 }
   377 
   382 
   378 // Called from ProcessManagerThread
   383 // Called from ProcessManagerThread
   475 }
   480 }
   476 
   481 
   477 // Called from ProcessManagerThread
   482 // Called from ProcessManagerThread
   478 QProcessManagerMediator::~QProcessManagerMediator()
   483 QProcessManagerMediator::~QProcessManagerMediator()
   479 {
   484 {
       
   485     Cancel();
   480     processManagerThread.Close();
   486     processManagerThread.Close();
   481     currentCommand = ENoCommand;
   487     currentCommand = ENoCommand;
   482     currentObserver = NULL;
   488     currentObserver = NULL;
   483 }
   489 }
   484 
   490