Commit 560abd61 authored by Daniel Teske's avatar Daniel Teske

CMakeRunConfiguration: Check once with object_cast for CMakeProject

And then use that knowledge to simply do a static_cast

Change-Id: Ia145468235ed0b75ed243d6ae2d76ab824df2958
Reviewed-by: default avatarTobias Hunger <>
parent 28f71d6a
......@@ -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);
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