forked from qt-creator/qt-creator
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user