summaryrefslogtreecommitdiff
path: root/src/plugins/ios
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@qt.io>2018-03-07 10:35:08 +0100
committerTobias Hunger <tobias.hunger@qt.io>2018-03-07 14:35:15 +0000
commit6e419d642a2c1e9d6f5cc334bdd58305fd01b3e5 (patch)
treea04eb067a58183327c728ad1cc58a39718cd1a92 /src/plugins/ios
parent23e48fe207d62b16ca5cef701536ce34f3c9681d (diff)
downloadqt-creator-6e419d642a2c1e9d6f5cc334bdd58305fd01b3e5.tar.gz
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>
Diffstat (limited to 'src/plugins/ios')
-rw-r--r--src/plugins/ios/iosrunfactories.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/ios/iosrunfactories.cpp b/src/plugins/ios/iosrunfactories.cpp
index dccf82e952..854cf45c75 100644
--- a/src/plugins/ios/iosrunfactories.cpp
+++ b/src/plugins/ios/iosrunfactories.cpp
@@ -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});