ProjectExplorer: Simplify LocalEnvspect's BaseEnvironmentModifier

The run configuration is known at setup time, and fixed.

Change-Id: Iad7837bf39fb5eeed49bd71b7f14b9692014ea9d
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
hjk
2018-09-06 10:45:51 +02:00
parent 2a30f0e5d6
commit 06b6fff25e
5 changed files with 8 additions and 10 deletions

View File

@@ -44,11 +44,11 @@ CMakeRunConfiguration::CMakeRunConfiguration(Target *target, Core::Id id)
: RunConfiguration(target, id)
{
// Workaround for QTCREATORBUG-19354:
auto cmakeRunEnvironmentModifier = [](RunConfiguration *rc, Utils::Environment &env) {
if (!Utils::HostOsInfo::isWindowsHost() || !rc)
auto cmakeRunEnvironmentModifier = [target](Utils::Environment &env) {
if (!Utils::HostOsInfo::isWindowsHost())
return;
const Kit *k = rc->target()->kit();
const Kit *k = target->kit();
const QtSupport::BaseQtVersion *qt = QtSupport::QtKitInformation::qtVersion(k);
if (qt)
env.prependOrSetPath(qt->qmakeProperty("QT_INSTALL_BINS"));