diff options
author | hjk <hjk@qt.io> | 2017-12-19 13:54:16 +0100 |
---|---|---|
committer | hjk <hjk@qt.io> | 2018-01-11 10:49:27 +0000 |
commit | 4b7c82b1317678f62926e1284d4088379345b4af (patch) | |
tree | 64c9d80ebd7a2ac328f8e1439c8e9e9e2bd4234d /src/plugins/ios | |
parent | 048a05584c262b898590ecca6fef4ecd40472bdd (diff) | |
download | qt-creator-4b7c82b1317678f62926e1284d4088379345b4af.tar.gz |
QmakeProject: Centralize some code for subproject runconfig handling
Change-Id: Iecd8c326fc7fd1b1e7e5406fd899befc9fdd3c5b
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src/plugins/ios')
-rw-r--r-- | src/plugins/ios/iosrunfactories.cpp | 12 | ||||
-rw-r--r-- | src/plugins/ios/iosrunfactories.h | 4 |
2 files changed, 4 insertions, 12 deletions
diff --git a/src/plugins/ios/iosrunfactories.cpp b/src/plugins/ios/iosrunfactories.cpp index 1cc83f3911..dccf82e952 100644 --- a/src/plugins/ios/iosrunfactories.cpp +++ b/src/plugins/ios/iosrunfactories.cpp @@ -68,16 +68,10 @@ QList<BuildTargetInfo> ProjectType::AuxTemplate}); } -QList<RunConfiguration *> IosRunConfigurationFactory::runConfigurationsForNode(Target *t, const Node *n) +bool IosRunConfigurationFactory::hasRunConfigForProFile(RunConfiguration *rc, const Utils::FileName &n) const { - QList<RunConfiguration *> result; - foreach (RunConfiguration *rc, t->runConfigurations()) { - if (IosRunConfiguration *qt4c = qobject_cast<IosRunConfiguration *>(rc)) { - if (qt4c->profilePath() == n->filePath()) - result << rc; - } - } - return result; + auto iosRc = qobject_cast<IosRunConfiguration *>(rc); + return iosRc && iosRc->profilePath() == n; } } // namespace Internal diff --git a/src/plugins/ios/iosrunfactories.h b/src/plugins/ios/iosrunfactories.h index 6b9e606dab..ed99b5f69f 100644 --- a/src/plugins/ios/iosrunfactories.h +++ b/src/plugins/ios/iosrunfactories.h @@ -48,9 +48,7 @@ public: bool canCreateHelper(ProjectExplorer::Target *parent, const QString &suffix) const override; - QList<ProjectExplorer::RunConfiguration *> runConfigurationsForNode(ProjectExplorer::Target *t, - const ProjectExplorer::Node *n - ) override; + bool hasRunConfigForProFile(ProjectExplorer::RunConfiguration *rc, const Utils::FileName &n) const override; }; } // namespace Internal |