CMakeRunConfiguration: Check once with object_cast for CMakeProject

And then use that knowledge to simply do a static_cast

Change-Id: Ia145468235ed0b75ed243d6ae2d76ab824df2958
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
Daniel Teske
2012-07-04 12:20:13 +02:00
parent 28f71d6ae9
commit 560abd6109

View File

@@ -495,9 +495,9 @@ CMakeRunConfigurationFactory::~CMakeRunConfigurationFactory()
// used to show the list of possible additons to a project, returns a list of ids
QList<Core::Id> CMakeRunConfigurationFactory::availableCreationIds(ProjectExplorer::Target *parent) const
{
CMakeProject *project = qobject_cast<CMakeProject *>(parent->project());
if (!canHandle(parent))
return QList<Core::Id>();
CMakeProject *project = static_cast<CMakeProject *>(parent->project());
QList<Core::Id> allIds;
foreach (const QString &buildTarget, project->buildTargetTitles())
allIds << idFromBuildTarget(buildTarget);