diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectnodes.cpp b/src/plugins/cmakeprojectmanager/cmakeprojectnodes.cpp index 64344436665..2e99162ada6 100644 --- a/src/plugins/cmakeprojectmanager/cmakeprojectnodes.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeprojectnodes.cpp @@ -104,6 +104,11 @@ bool CMakeListsNode::showInSimpleTree() const return false; } +bool CMakeListsNode::supportsAction(ProjectExplorer::ProjectAction action, const ProjectExplorer::Node *node) const +{ + return action == ProjectExplorer::ProjectAction::AddNewFile; +} + CMakeProjectNode::CMakeProjectNode(const Utils::FileName &directory) : ProjectExplorer::ProjectNode(directory) { @@ -122,12 +127,6 @@ QString CMakeProjectNode::tooltip() const return QString(); } -bool CMakeProjectNode::supportsAction(ProjectExplorer::ProjectAction action, - const ProjectExplorer::Node *node) const -{ - return action == ProjectExplorer::ProjectAction::AddNewFile; -} - bool CMakeProjectNode::addFiles(const QStringList &filePaths, QStringList *notAdded) { noAutoAdditionNotify(filePaths, this); diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectnodes.h b/src/plugins/cmakeprojectmanager/cmakeprojectnodes.h index e483e7b61e5..35adee0bd91 100644 --- a/src/plugins/cmakeprojectmanager/cmakeprojectnodes.h +++ b/src/plugins/cmakeprojectmanager/cmakeprojectnodes.h @@ -46,6 +46,7 @@ public: CMakeListsNode(const Utils::FileName &cmakeListPath); bool showInSimpleTree() const final; + bool supportsAction(ProjectExplorer::ProjectAction action, const Node *node) const override; }; class CMakeProjectNode : public ProjectExplorer::ProjectNode @@ -56,7 +57,6 @@ public: bool showInSimpleTree() const final; QString tooltip() const final; - bool supportsAction(ProjectExplorer::ProjectAction action, const Node *node) const override; bool addFiles(const QStringList &filePaths, QStringList *notAdded) override; };