summaryrefslogtreecommitdiffstats
path: root/src/corelib/doc/src/qt6-changes.qdoc
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2020-10-15 12:23:15 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2020-10-16 04:44:29 +0200
commit56332031a5667a8b64035ada250c1c1b9c80e217 (patch)
tree9347c4599a7237c92c4e4a8922c7f24a56209f6e /src/corelib/doc/src/qt6-changes.qdoc
parent862bdcd09cef3301d5681c9f7c35783a0f3fa35d (diff)
Document noteworthy change in QProcess
Change-Id: I4d9769901aef8255fc111f33eb141e05398f0ee3 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/corelib/doc/src/qt6-changes.qdoc')
-rw-r--r--src/corelib/doc/src/qt6-changes.qdoc31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/corelib/doc/src/qt6-changes.qdoc b/src/corelib/doc/src/qt6-changes.qdoc
index 3b4f53cbf9..753eb17302 100644
--- a/src/corelib/doc/src/qt6-changes.qdoc
+++ b/src/corelib/doc/src/qt6-changes.qdoc
@@ -330,4 +330,35 @@
return true;
}
\endcode
+
+ \section1 IO Classes
+
+ \section2 QProcess
+
+ In Qt 6, the QProcess::start() overload that interprets a single command string
+ by splitting it into program name and arguments is renamed to QProcess::startCommand().
+ However, a QProcess::start() overload that takes a single string, as well as a QStringList
+ for arguments exists. Since the QStringList parameter defaults to the empty list, existing
+ code only passing a string will still compile, but will fail to execute the process if it
+ is a complete command string that includes arguments.
+
+ Qt 5.15 introduced deprecation warnings for the respective overload to make it easy to
+ discover and update existing code:
+
+ \code
+ QProcess process;
+
+ // compiles with warnings in 5.15, compiles but fails with Qt 6
+ process.start("dir \"My Documents\"");
+
+ // works with both Qt 5 and Qt 6; also see QProcess::splitCommand()
+ process.start("dir", QStringList({"My Documents"});
+
+ // works with Qt 6
+ process.startCommand("dir \"My Documents\"");
+ \endcode
+
+ QProcess::pid() and the Q_PID type have been removed; use QProcess::processId() instead to
+ get the native process identifier. Code using native Win32 APIs to access the data in the
+ Q_PID as a Win32 \c{PROCESS_INFORMATION} struct is no longer supported.
*/