diff options
author | hjk <hjk@qt.io> | 2021-08-03 15:12:24 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2021-08-11 13:33:52 +0000 |
commit | 6418eb2ddaa60da246a03951798fbb2dfdb864f6 (patch) | |
tree | 2a2155246cc519635a18c87a3232a2ed30d8f4d0 /src/plugins/vcsbase/commonvcssettings.cpp | |
parent | 6405f9c436bbe39c7a36dd3f3551d304665d000a (diff) | |
download | qt-creator-6418eb2ddaa60da246a03951798fbb2dfdb864f6.tar.gz |
Utils: Use EnvironmentChange instead of Environment in several places
For path choosers this makes it easier to change the actual base retrospectively
based on the device for the file path entered by the user.
In other cases "end user code" only knows that something needs to
be added to PATH to get a proper environment. This here lets this
code to specify the change alone without bothering about the base
environment this might be applied to.
Change-Id: I726aaa2fd2feb0bee7158f601aac660b0ac6327b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins/vcsbase/commonvcssettings.cpp')
-rw-r--r-- | src/plugins/vcsbase/commonvcssettings.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/plugins/vcsbase/commonvcssettings.cpp b/src/plugins/vcsbase/commonvcssettings.cpp index e927c22552..9d6bfe2032 100644 --- a/src/plugins/vcsbase/commonvcssettings.cpp +++ b/src/plugins/vcsbase/commonvcssettings.cpp @@ -155,10 +155,9 @@ CommonSettingsWidget::CommonSettingsWidget(CommonOptionsPage *page) void CommonSettingsWidget::updatePath() { - Environment env = Environment::systemEnvironment(); - QStringList toAdd = Core::VcsManager::additionalToolsPath(); - env.appendOrSetPath(toAdd.join(HostOsInfo::pathListSeparator())); - m_page->settings().sshPasswordPrompt.setEnvironment(env); + EnvironmentChange change; + change.addAppendToPath(Core::VcsManager::additionalToolsPath()); + m_page->settings().sshPasswordPrompt.setEnvironmentChange(change); } void CommonSettingsWidget::apply() |