diff options
author | hjk <hjk@qt.io> | 2020-02-25 13:50:25 +0100 |
---|---|---|
committer | hjk <hjk@qt.io> | 2020-02-25 13:38:53 +0000 |
commit | cc857390f8c5e347ae9f4eed6cf8dcf5d14c1c22 (patch) | |
tree | 5bccc0668c1b4218f3101733ef58aef90c3638aa /src/plugins/qmakeprojectmanager | |
parent | 2c406ff3984ab650f6a99bfcb26662d153f6cf6b (diff) |
QmakeProject: Use buildsystem's own build config for toolchain tests
It is currently only getting there if it's the active one, so it is
not a real problem, but distracting.
Change-Id: I1f83644a71a3f22e23f966e273c1a23cfc0cc6b7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/qmakeprojectmanager')
-rw-r--r-- | src/plugins/qmakeprojectmanager/qmakeproject.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/plugins/qmakeprojectmanager/qmakeproject.cpp b/src/plugins/qmakeprojectmanager/qmakeproject.cpp index 40ab552a654..e337f84ed53 100644 --- a/src/plugins/qmakeprojectmanager/qmakeproject.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeproject.cpp @@ -1232,15 +1232,11 @@ void QmakeBuildSystem::testToolChain(ToolChain *tc, const FilePath &path) const const Utils::FilePath expected = tc->compilerCommand(); - Environment env = Environment::systemEnvironment(); Target *t = target(); QTC_ASSERT(t, return); - Kit *k = t->kit(); - if (BuildConfiguration *bc = t->activeBuildConfiguration()) - env = bc->environment(); - else - k->addToEnvironment(env); + QTC_ASSERT(m_buildConfiguration, return); + Environment env = m_buildConfiguration->environment(); if (env.isSameExecutable(path.toString(), expected.toString())) return; @@ -1261,7 +1257,9 @@ void QmakeBuildSystem::testToolChain(ToolChain *tc, const FilePath &path) const "\"%1\" is used by qmake, but \"%2\" is configured in the kit.\n" "Please update your kit (%3) or choose a mkspec for qmake that matches " "your target environment better.") - .arg(path.toUserOutput()).arg(expected.toUserOutput()).arg(k->displayName()))); + .arg(path.toUserOutput()) + .arg(expected.toUserOutput()) + .arg(t->kit()->displayName()))); m_toolChainWarnings.insert(pair); } |