forked from qt-creator/qt-creator
ProjectExplorer: Fix assert in MakeStep
... when it's part of a deploy configuration. Change-Id: I56340ea5553a267daa04b5fd89aff382ec1d27cd Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -247,7 +247,9 @@ BuildSystem *BuildStep::buildSystem() const
|
||||
|
||||
Environment BuildStep::buildEnvironment() const
|
||||
{
|
||||
if (auto bc = buildConfiguration())
|
||||
if (const auto bc = qobject_cast<BuildConfiguration *>(parent()->parent()))
|
||||
return bc->environment();
|
||||
if (const auto bc = target()->activeBuildConfiguration())
|
||||
return bc->environment();
|
||||
return Environment::systemEnvironment();
|
||||
}
|
||||
|
||||
@@ -183,9 +183,6 @@ static const QList<ToolChain *> preferredToolChains(const Kit *kit)
|
||||
|
||||
FilePath MakeStep::defaultMakeCommand() const
|
||||
{
|
||||
BuildConfiguration *bc = buildConfiguration();
|
||||
if (!bc)
|
||||
return {};
|
||||
const Utils::Environment env = makeEnvironment();
|
||||
for (const ToolChain *tc : preferredToolChains(kit())) {
|
||||
FilePath make = tc->makeCommand(env);
|
||||
|
||||
Reference in New Issue
Block a user