From 8d7d481772e251d979ccf37c1405451e6f6780de Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 30 Nov 2015 10:52:59 -0800 Subject: [PATCH] doc: add a note about cmd.exe and the QProcess string splitting/joining cmd.exe uses a different set of characters to split arguments on, which is not compatible with CommandLineToArgvW(). See https://technet.microsoft.com/en-us/library/bb490880.aspx. Task-number: QTBUG-49641 Change-Id: Ic90fe6b1cbe84978a02fffff141b8f961a43ad28 Reviewed-by: Oswald Buddenhagen --- src/corelib/io/qprocess.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp index b09c99985c..952116b9db 100644 --- a/src/corelib/io/qprocess.cpp +++ b/src/corelib/io/qprocess.cpp @@ -2098,7 +2098,9 @@ QByteArray QProcess::readAllStandardError() \b{Windows:} The arguments are quoted and joined into a command line that is compatible with the \c CommandLineToArgvW() Windows function. For programs that have different command line quoting requirements, - you need to use setNativeArguments(). + you need to use setNativeArguments(). One notable program that does + not follow the \c CommandLineToArgvW() rules is cmd.exe and, by + consequence, all batch scripts. The OpenMode is set to \a mode.