forked from qt-creator/qt-creator
ProjectExplorer: Hide parts of BuildStep's QObject-ness from users
This lets the compiler catch issues like QTCREATORBUG-22818 and saves visible casts on the user side. Change-Id: I5a307a55364daa0bec039a4c38cc9827841ff9c1 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -262,8 +262,9 @@ BuildStepConfigWidget *CMakeBuildStep::createConfigWidget()
|
||||
|
||||
QString CMakeBuildStep::defaultBuildTarget() const
|
||||
{
|
||||
const auto pc = qobject_cast<BuildStepList *>(parent());
|
||||
const Core::Id parentId = pc ? pc->id() : Core::Id();
|
||||
const BuildStepList *const bsl = stepList();
|
||||
QTC_ASSERT(bsl, return {});
|
||||
const Core::Id parentId = bsl->id();
|
||||
if (parentId == ProjectExplorer::Constants::BUILDSTEPS_CLEAN)
|
||||
return cleanTarget();
|
||||
if (parentId == ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
|
||||
|
||||
Reference in New Issue
Block a user