Utils::Environment Class
class Utils::EnvironmentThe Environment class sets Qt Creator's system environment. More...
| Header: | #include <environment.h> |
Public Functions
| Utils::EnvironmentItems | changeItems() const |
| bool | isComplete() const |
Static Public Members
| Utils::Environment | emptyComplete(Utils::OsType osType = HostOsInfo::hostOs()) |
| const Utils::Environment & | originalSystemEnvironment() |
| Utils::Environment | systemEnvironment() |
Member Function Documentation
Utils::EnvironmentItems Environment::changeItems() const
Returns the changes this environment makes to the environment it is applied to. The environment must not be complete. Each variable gets at most one SetEnabled or Unset item.
A Prepend or Append to a variable that an earlier change sets is merged into that value. If an earlier change unsets the variable, the Prepend or Append becomes a plain set. Otherwise it stays a separate item, and the receiver applies it to its own value of the variable.
[static] Utils::Environment Environment::emptyComplete(Utils::OsType osType = HostOsInfo::hostOs())
Returns a complete environment without any variables. Unlike Environment(OsType), which only records changes to be applied to an environment determined later, it inherits nothing from the device it is used on.
bool Environment::isComplete() const
Returns whether this environment holds all variables, not just changes.
[static] const Utils::Environment &Environment::originalSystemEnvironment()
Returns Qt Creator's original system environment.
This is the full, unmodified environment that Qt Creator was started with. Use this environment to start processes that are built alongside Qt Creator and thus have the same library dependencies. This is particularly relevant if Qt Creator was started via Squish or another instance of Qt Creator, i.e. in testing or development contexts. For all other processes, use systemEnvironment() or more specialized variants such as the build environment, if applicable.
[static] Utils::Environment Environment::systemEnvironment()
Returns Qt Creator's system environment.
This can be different from the system environment that Qt Creator started in if the user changed it in Preferences > Environment > System > Environment.
See also originalSystemEnvironment().
Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.