diff --git a/src/plugins/ios/iosrunconfiguration.cpp b/src/plugins/ios/iosrunconfiguration.cpp index 435a67ef294..2790734e583 100644 --- a/src/plugins/ios/iosrunconfiguration.cpp +++ b/src/plugins/ios/iosrunconfiguration.cpp @@ -157,11 +157,6 @@ void IosRunConfiguration::updateEnabledState() return RunConfiguration::updateEnabledState(); } -bool IosRunConfiguration::canRunForNode(const Node *node) const -{ - return node->filePath().toString() == buildKey(); -} - QString IosRunConfiguration::applicationName() const { Project *project = target()->project(); diff --git a/src/plugins/ios/iosrunconfiguration.h b/src/plugins/ios/iosrunconfiguration.h index 72d30b02273..3265f242672 100644 --- a/src/plugins/ios/iosrunconfiguration.h +++ b/src/plugins/ios/iosrunconfiguration.h @@ -57,7 +57,6 @@ private: friend class IosDeviceTypeAspect; void updateDisplayNames(); void updateEnabledState() final; - bool canRunForNode(const ProjectExplorer::Node *node) const final; IosDeviceTypeAspect *m_deviceTypeAspect = nullptr; }; diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index 184730c76e7..c7abb798eab 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -3176,8 +3176,9 @@ void ProjectExplorerPluginPrivate::updateContextMenuActions() } else { QList runConfigs; if (Target *t = project->activeTarget()) { + const QString buildKey = pn->buildKey(); for (RunConfiguration *rc : t->runConfigurations()) { - if (rc->canRunForNode(pn)) + if (rc->buildKey() == buildKey) runConfigs.append(rc); } } diff --git a/src/plugins/projectexplorer/runconfiguration.h b/src/plugins/projectexplorer/runconfiguration.h index 782876dbc94..32052e59b6f 100644 --- a/src/plugins/projectexplorer/runconfiguration.h +++ b/src/plugins/projectexplorer/runconfiguration.h @@ -182,7 +182,6 @@ public: BuildTargetInfo buildTargetInfo() const; static RunConfiguration *startupRunConfiguration(); - virtual bool canRunForNode(const ProjectExplorer::Node *) const { return false; } template T *currentSettings(Core::Id id) const { diff --git a/src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp b/src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp index c68ef96122e..a649188aaeb 100644 --- a/src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp +++ b/src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp @@ -163,14 +163,6 @@ void QbsRunConfiguration::updateTargetInformation() emit enabledChanged(); } -bool QbsRunConfiguration::canRunForNode(const Node *node) const -{ - if (auto pn = dynamic_cast(node)) - return buildKey() == pn->buildKey(); - - return false; -} - // -------------------------------------------------------------------- // QbsRunConfigurationFactory: // -------------------------------------------------------------------- diff --git a/src/plugins/qbsprojectmanager/qbsrunconfiguration.h b/src/plugins/qbsprojectmanager/qbsrunconfiguration.h index 94b3ae65350..5abe3e202f0 100644 --- a/src/plugins/qbsprojectmanager/qbsrunconfiguration.h +++ b/src/plugins/qbsprojectmanager/qbsrunconfiguration.h @@ -48,7 +48,6 @@ private: QVariantMap toMap() const final; bool fromMap(const QVariantMap &map) final; void doAdditionalSetup(const ProjectExplorer::RunConfigurationCreationInfo &rci) final; - bool canRunForNode(const ProjectExplorer::Node *node) const final; void updateTargetInformation(); diff --git a/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp b/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp index 8ac2a1cd0b5..887104559a4 100644 --- a/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp +++ b/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp @@ -130,11 +130,6 @@ void DesktopQmakeRunConfiguration::addToBaseEnvironment(Environment &env) const } } -bool DesktopQmakeRunConfiguration::canRunForNode(const Node *node) const -{ - return node->filePath() == proFilePath(); -} - FileName DesktopQmakeRunConfiguration::proFilePath() const { return FileName::fromString(buildKey()); diff --git a/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.h b/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.h index 2a4ccd564ba..dde5a1eaff1 100644 --- a/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.h +++ b/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.h @@ -47,8 +47,6 @@ private: void doAdditionalSetup(const ProjectExplorer::RunConfigurationCreationInfo &info) final; QString defaultDisplayName(); - bool canRunForNode(const ProjectExplorer::Node *node) const final; - Utils::FileName proFilePath() const; };