Files
qt-creator/src/plugins/projectexplorer/buildconfiguration.cpp
Eike Ziller 550a7ecc6e BuildConfiguration: Do not update environment cache in constructor
Updating the environment cache calls into the virtual function
BuildConfiguration::addToEnvironment (via BC::baseEnvironment()), and
that is not working in the constructor yet.

Move the call to updateCacheAndEmitEnvironmentChanged to
BC::doInitialize.

This fixes the build environment for the first CMake run on a newly
created project. CMakeBuildConfiguration::addToEnvironment adds the PATH
to the Ninja installation from the online installer. If that is missing,
CMake will fail with a missing build tool, if Ninja isn't found anywhere
else.

Amends 65e043961e

Task-number: QTCREATORBUG-27495
Change-Id: I7c952db9029ab78e0aa9ea267444af163f5941ac
Reviewed-by: hjk <hjk@qt.io>
2022-07-13 12:32:03 +00:00

28 KiB