Why is QProcess converting the '=' in my arguments to spaces

Posted by dagorym on Stack Overflow See other posts from Stack Overflow or by dagorym
Published on 2010-06-11T20:50:19Z Indexed on 2010/06/11 20:52 UTC
Read the original article Hit count: 342

Filed under:
|
|

I've run into a weird error with a Qt program running on Windows. The program uses QProcess to spawn a child process wit two arguments. The program and arguments passed to the QProcess::start() method are of the form:

"batchfile.bat" "--option1=some_value" "--option2=some_other_value\with_a\path"

For some reason by the time those options get to the batchfile for processing the equals signs have been converted to spaces and it now looks like:

"batchfile.bat" "--option1 some_value" "--option2 some_other_value\with_a\path"

because of this, the processing fails. Any ideas what could be causing the equal signs to be replaced by spaces? I'm using the mingw build of the QT 4.6.3 framework found on the Qt download page.

© Stack Overflow or respective owner

Related posts about Windows

Related posts about qt