summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qprocess.cpp
diff options
context:
space:
mode:
authorIevgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>2022-02-10 15:31:09 +0100
committerIevgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>2022-02-11 20:47:21 +0100
commit4082fe8a396710db30b3e2a748636f21195b0e5c (patch)
tree0d4023bb59e1bfa5163bb7cf717be99537235b74 /src/corelib/io/qprocess.cpp
parent5958c28d9fbfa4432887e83e97defb76b0dda14d (diff)
Make QProcessEnvironment(Initialization) noexcept
Use default noexcept constructor to initialize `d` member. Document Initialization enum. Fixes: QTBUG-100695 Pick-to: 6.3 Change-Id: I7585ad154a9be40021a205b515ffa7b14f188d67 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/corelib/io/qprocess.cpp')
-rw-r--r--src/corelib/io/qprocess.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp
index 23c90daff4..6b6247e92d 100644
--- a/src/corelib/io/qprocess.cpp
+++ b/src/corelib/io/qprocess.cpp
@@ -148,15 +148,27 @@ void QProcessEnvironmentPrivate::insert(const QProcessEnvironmentPrivate &other)
}
/*!
+ \enum QProcessEnvironment::Initialization
+
+ This enum contains a token that is used to disambiguate constructors.
+
+ \value InheritFromParent A QProcessEnvironment will be created that, when
+ set on a QProcess, causes it to inherit variables from its parent.
+
+ \since 6.3
+*/
+
+/*!
Creates a new QProcessEnvironment object. This constructor creates an
empty environment. If set on a QProcess, this will cause the current
- environment variables to be removed.
+ environment variables to be removed (except for PATH and SystemRoot
+ on Windows).
*/
QProcessEnvironment::QProcessEnvironment() : d(new QProcessEnvironmentPrivate) { }
/*!
Creates an object that when set on QProcess will cause it to be executed with
- environment variables inherited from the parent process.
+ environment variables inherited from its parent process.
\note The created object does not store any environment variables by itself,
it just indicates to QProcess to arrange for inheriting the environment at the
@@ -172,7 +184,7 @@ QProcessEnvironment::QProcessEnvironment() : d(new QProcessEnvironmentPrivate) {
\sa inheritsFromParent(), systemEnvironment()
\since 6.3
*/
-QProcessEnvironment::QProcessEnvironment(QProcessEnvironment::Initialization) : d(nullptr) { }
+QProcessEnvironment::QProcessEnvironment(QProcessEnvironment::Initialization) noexcept { }
/*!
Frees the resources associated with this QProcessEnvironment object.