QProcess issue with single quote ' on argument (win)
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:
Getting the argument in app2
if filePath contains a single quote ', the quote doesn't appears in filePath app2. Example:
Code:
...
filePath is: "c:/temp/11.file"
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.
Re: QProcess issue with single quote ' on argument (win)
Then start with double quoted arguments
Code:
QProcess::startDetached("app2Path/app2 \"c:/temp/1'1.file\"")
Re: QProcess issue with single quote ' on argument (win)
Thank you, I totally missed this approach :)
BTW, this is not working (app2 doesn't start):
Code:
QProcess::startDetached("app2Path/app2 \"c:/temp/1'1.file\"")
I have fixed it, doing this:
:confused: