Hi,

I having a weird issue using QProcess. I have two Qt (4.8.4) apps, the firts one starts detached the second one, passing a filePath as argument.

Invocation from app1:
Qt Code:
  1. QProcess::startDetached("app2Path/app2",QStringList() << filePath);
To copy to clipboard, switch view to plain text mode 

Getting the argument in app2
Qt Code:
  1. QString filePath= QCoreApplication::arguments().at(1);
To copy to clipboard, switch view to plain text mode 

if filePath contains a single quote ', the quote doesn't appears in filePath app2. Example:

Qt Code:
  1. QProcess::startDetached("app2Path/app2",QStringList() << "c:/temp/1'1.file");
  2. ...
  3. QString filePath= QCoreApplication::arguments().at(1);
  4.  
  5. filePath is: "c:/temp/11.file"
To copy to clipboard, switch view to plain text mode 

Launching app2 from command line, only works fine if I use double quotes in the argument:

app2 c:\temp\1'1.file --> don't work
app2 "c:\temp\1'1.file" --> OK

What is going on? I haven't test this issue in MacOSX or Linux.