forked from qt-creator/qt-creator
Support AddFiles same way as QMake project
Change-Id: Ib1b5e9ba201623b48144766048d3b404ff016131 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user