forked from qt-creator/qt-creator
RunConfigurationFactories: Fix crash opening non-qmake based projects
Make sure the Qnx RCs only get triggered for qmake-based projects and defend against broken set-ups using QTC_ASSERT. Task-number: QTCREATORBUG-19755 Change-Id: If64b73de49b0199308f767151d68909dc8b1bc53 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -62,7 +62,8 @@ bool IosRunConfigurationFactory::canCreateHelper(Target *parent, const QString &
|
||||
QList<BuildTargetInfo>
|
||||
IosRunConfigurationFactory::availableBuildTargets(Target *parent, CreationMode mode) const
|
||||
{
|
||||
auto project = static_cast<QmakeProject *>(parent->project());
|
||||
auto project = qobject_cast<QmakeProject *>(parent->project());
|
||||
QTC_ASSERT(project, return {});
|
||||
return project->buildTargets(mode, {ProjectType::ApplicationTemplate,
|
||||
ProjectType::SharedLibraryTemplate,
|
||||
ProjectType::AuxTemplate});
|
||||
|
||||
Reference in New Issue
Block a user