Let users set a global default for whether to amend the run environment

... with the paths of libraries used at link time. The value can still
be set per run config.

Task-number: QTCREATORBUG-20240
Change-Id: Ibe2425e95d791f93af2fba85a64be8bde6b31f5a
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
This commit is contained in:
Christian Kandeler
2018-04-11 16:15:35 +02:00
parent d7f431482d
commit 4ab7c19e84
6 changed files with 25 additions and 2 deletions

View File

@@ -33,6 +33,8 @@
#include <projectexplorer/localenvironmentaspect.h>
#include <projectexplorer/project.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectexplorersettings.h>
#include <projectexplorer/runconfigurationaspects.h>
#include <projectexplorer/target.h>
@@ -88,6 +90,8 @@ public:
QbsRunConfiguration::QbsRunConfiguration(Target *target)
: RunConfiguration(target, QBS_RC_PREFIX)
{
m_usingLibraryPaths = ProjectExplorerPlugin::projectExplorerSettings().addLibraryPathsToRunEnv;
auto envAspect = new LocalEnvironmentAspect(this,
[](RunConfiguration *rc, Environment &env) {
static_cast<QbsRunConfiguration *>(rc)->addToBaseEnvironment(env);