forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -317,10 +317,9 @@ void SystemSettingsWidget::resetFileBrowser()
|
||||
|
||||
void SystemSettingsWidget::updatePath()
|
||||
{
|
||||
Environment env = Environment::systemEnvironment();
|
||||
QStringList toAdd = VcsManager::additionalToolsPath();
|
||||
env.appendOrSetPath(toAdd.join(HostOsInfo::pathListSeparator()));
|
||||
m_ui.patchChooser->setEnvironment(env);
|
||||
EnvironmentChange change;
|
||||
change.addAppendToPath(VcsManager::additionalToolsPath());
|
||||
m_ui.patchChooser->setEnvironmentChange(change);
|
||||
}
|
||||
|
||||
void SystemSettingsWidget::updateEnvironmentChangesLabel()
|
||||
|
||||
Reference in New Issue
Block a user