diff options
Diffstat (limited to 'src/plugins/projectexplorer/localenvironmentaspect.cpp')
-rw-r--r-- | src/plugins/projectexplorer/localenvironmentaspect.cpp | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/src/plugins/projectexplorer/localenvironmentaspect.cpp b/src/plugins/projectexplorer/localenvironmentaspect.cpp deleted file mode 100644 index 7510d636e5f..00000000000 --- a/src/plugins/projectexplorer/localenvironmentaspect.cpp +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 - -#include "localenvironmentaspect.h" - -#include "buildconfiguration.h" -#include "kit.h" -#include "projectexplorertr.h" -#include "target.h" - -using namespace Utils; - -namespace ProjectExplorer { - -LocalEnvironmentAspect::LocalEnvironmentAspect(Target *target, bool includeBuildEnvironment) -{ - setIsLocal(true); - addSupportedBaseEnvironment(Tr::tr("Clean Environment"), {}); - - addSupportedBaseEnvironment(Tr::tr("System Environment"), [] { - return Environment::systemEnvironment(); - }); - - if (includeBuildEnvironment) { - addPreferredBaseEnvironment(Tr::tr("Build Environment"), [target] { - Environment env; - if (BuildConfiguration *bc = target->activeBuildConfiguration()) { - env = bc->environment(); - } else { // Fallback for targets without buildconfigurations: - env = target->kit()->buildEnvironment(); - } - return env; - }); - - connect(target, - &Target::activeBuildConfigurationChanged, - this, - &EnvironmentAspect::environmentChanged); - connect(target, - &Target::buildEnvironmentChanged, - this, - &EnvironmentAspect::environmentChanged); - } -} - -} // namespace ProjectExplorer |