[Qt-creator] Displaying the user environment changes
Christian.Kandeler at qt.io
Wed Feb 26 18:00:20 CET 2020
On Wed, 26 Feb 2020 17:07:49 +0100
Markus Redeker <markus at froglogic.com> wrote:
> On Wed, 26 Feb 2020 11:37:28 +0000
> Christian Kandeler <Christian.Kandeler at qt.io> wrote:
> > Retrieve the environment aspect from the build config via aspect<EnvironmentAspect>() and call setUserEnvironmentChanges() on that object.
> This does not work. The build configuration does not have an
> EnvironmentAspect, at least not one that one can get with
> aspect<EnvironmentAspect>(). For the run configuration it does indeed work.
> Instead it looks to me as if the BuildEnvironmentWidget works entirely
> without aspects.
Indeed. So the original problem still stands, i.e. that the widget considers itself the authoritative source of user environment changes (which I suppose makes some sense). Either that design will have to be changed, or you should not think of whatever changes you do as "user changes", but changes to the base environment, and use the respective functions.
(The EnvironmentAspect has a third category "modifiers", which are programmatic changes to the base environment. I suppose this matches what you are doing here).
More information about the Qt-creator