Qmake: Use direct access to build config from system when available

Change-Id: Ic514fb73db90f0868679d04efba62c40e28b7b59
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2020-02-06 18:59:02 +01:00
parent 3894dbfa65
commit e9f2178a4a

View File

@@ -661,18 +661,15 @@ QtSupport::ProFileReader *QmakeBuildSystem::createProFileReader(const QmakeProFi
m_qmakeGlobals = std::make_unique<QMakeGlobals>();
m_qmakeGlobalsRefCnt = 0;
Environment env = Environment::systemEnvironment();
QStringList qmakeArgs;
Target *t = target();
Kit *k = t->kit();
if (auto bc = static_cast<QmakeBuildConfiguration *>(t->activeBuildConfiguration())) {
env = bc->environment();
if (QMakeStep *qs = bc->qmakeStep())
Environment env = m_buildConfiguration->environment();
if (QMakeStep *qs = m_buildConfiguration->qmakeStep())
qmakeArgs = qs->parserArguments();
else
qmakeArgs = bc->configCommandLineArguments();
}
qmakeArgs = m_buildConfiguration->configCommandLineArguments();
QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitAspect::qtVersion(k);
m_qmakeSysroot = SysRootKitAspect::sysRoot(k).toString();