Commit 7cf9312a authored by Tobias Hunger's avatar Tobias Hunger
Browse files

Qbs: Do not list Qbs steps in non-Qbs projects



They can not work there anyway.

Change-Id: Ic643ae7e35ad599ffb3928530eafb6ec537f3f04
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent ba2d0fc9
......@@ -422,7 +422,8 @@ QbsBuildStepFactory::QbsBuildStepFactory(QObject *parent) :
QList<Core::Id> QbsBuildStepFactory::availableCreationIds(ProjectExplorer::BuildStepList *parent) const
{
if (parent->id() == ProjectExplorer::Constants::BUILDSTEPS_BUILD
&& qobject_cast<QbsBuildConfiguration *>(parent->parent()))
&& qobject_cast<QbsBuildConfiguration *>(parent->parent())
&& qobject_cast<QbsProject *>(parent->target()->project()))
return QList<Core::Id>() << Core::Id(Constants::QBS_BUILDSTEP_ID);
return QList<Core::Id>();
}
......@@ -437,7 +438,8 @@ QString QbsBuildStepFactory::displayNameForId(const Core::Id id) const
bool QbsBuildStepFactory::canCreate(ProjectExplorer::BuildStepList *parent, const Core::Id id) const
{
if (parent->id() != Core::Id(ProjectExplorer::Constants::BUILDSTEPS_BUILD)
|| !qobject_cast<QbsBuildConfiguration *>(parent->parent()))
|| !qobject_cast<QbsBuildConfiguration *>(parent->parent())
|| !qobject_cast<QbsProject *>(parent->target()->project()))
return false;
return id == Core::Id(Constants::QBS_BUILDSTEP_ID);
}
......
......@@ -363,7 +363,8 @@ QbsInstallStepFactory::QbsInstallStepFactory(QObject *parent) :
QList<Core::Id> QbsInstallStepFactory::availableCreationIds(ProjectExplorer::BuildStepList *parent) const
{
if (parent->id() == ProjectExplorer::Constants::BUILDSTEPS_DEPLOY
&& qobject_cast<ProjectExplorer::DeployConfiguration *>(parent->parent()))
&& qobject_cast<ProjectExplorer::DeployConfiguration *>(parent->parent())
&& qobject_cast<QbsProject *>(parent->target()->project()))
return QList<Core::Id>() << Core::Id(Constants::QBS_INSTALLSTEP_ID);
return QList<Core::Id>();
}
......@@ -378,7 +379,8 @@ QString QbsInstallStepFactory::displayNameForId(const Core::Id id) const
bool QbsInstallStepFactory::canCreate(ProjectExplorer::BuildStepList *parent, const Core::Id id) const
{
if (parent->id() != Core::Id(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
|| !qobject_cast<ProjectExplorer::DeployConfiguration *>(parent->parent()))
|| !qobject_cast<ProjectExplorer::DeployConfiguration *>(parent->parent())
|| !qobject_cast<QbsProject *>(parent->target()->project()))
return false;
return id == Core::Id(Constants::QBS_INSTALLSTEP_ID);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment