CMake: Fix buildstep target selection

The BuildStepList is no longer a ProjectConfiguration, so this
code breaks.

Task-number: QTCREATORBUG-22818
Change-Id: I7350c0520d4b82e896761a87b52ccc1d47934530
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Tobias Hunger
2019-08-16 11:47:28 +02:00
parent 596a54f645
commit 4e45f71339

View File

@@ -262,7 +262,7 @@ BuildStepConfigWidget *CMakeBuildStep::createConfigWidget()
QString CMakeBuildStep::defaultBuildTarget() const QString CMakeBuildStep::defaultBuildTarget() const
{ {
const ProjectConfiguration *const pc = qobject_cast<ProjectConfiguration *>(parent()); const auto pc = qobject_cast<BuildStepList *>(parent());
const Core::Id parentId = pc ? pc->id() : Core::Id(); const Core::Id parentId = pc ? pc->id() : Core::Id();
if (parentId == ProjectExplorer::Constants::BUILDSTEPS_CLEAN) if (parentId == ProjectExplorer::Constants::BUILDSTEPS_CLEAN)
return cleanTarget(); return cleanTarget();