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:
@@ -93,12 +93,14 @@ public:
|
||||
|
||||
EnvironmentChange() = default;
|
||||
|
||||
static EnvironmentChange fromFixedEnvironment(const Environment &fixedEnv);
|
||||
|
||||
void applyToEnvironment(Environment &) const;
|
||||
|
||||
void addSetValue(const QString &key, const QString &value);
|
||||
void addUnsetValue(const QString &key);
|
||||
void addPrependToPath(const QString &value);
|
||||
void addAppendToPath(const QString &value);
|
||||
void addPrependToPath(const QStringList &values);
|
||||
void addAppendToPath(const QStringList &values);
|
||||
void addModify(const NameValueItems &items);
|
||||
void addChange(const Item &item) { m_changeItems.append(item); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user