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:
QProcess::startDetached("app2Path/app2",QStringList() << filePath);
To copy to clipboard, switch view to plain text mode
Getting the argument in app2
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:
...
filePath is: "c:/temp/11.file"
QProcess::startDetached("app2Path/app2",QStringList() << "c:/temp/1'1.file");
...
QString filePath= QCoreApplication::arguments().at(1);
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.
Bookmarks