forked from qt-creator/qt-creator
ProjectNodes: Sprinkle override over the Node classes
Change-Id: I87db3a1b212aa0a3f140b8d299679f6c1f691004 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
@@ -56,8 +56,8 @@ class AutotoolsProjectNode : public ProjectExplorer::ProjectNode
|
||||
public:
|
||||
AutotoolsProjectNode(AutotoolsProject *project, Core::IDocument *projectFile);
|
||||
|
||||
bool showInSimpleTree() const;
|
||||
QList<ProjectExplorer::ProjectAction> supportedActions(Node *node) const;
|
||||
bool showInSimpleTree() const override;
|
||||
QList<ProjectExplorer::ProjectAction> supportedActions(Node *node) const override;
|
||||
|
||||
private:
|
||||
AutotoolsProject *m_project;
|
||||
|
||||
@@ -43,8 +43,8 @@ class CMakeProjectNode : public ProjectExplorer::ProjectNode
|
||||
friend class CMakeProject;
|
||||
public:
|
||||
CMakeProjectNode(const Utils::FileName &fileName);
|
||||
virtual bool showInSimpleTree() const;
|
||||
virtual QList<ProjectExplorer::ProjectAction> supportedActions(Node *node) const;
|
||||
bool showInSimpleTree() const override;
|
||||
QList<ProjectExplorer::ProjectAction> supportedActions(Node *node) const override;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -52,13 +52,13 @@ public:
|
||||
Core::IDocument *projectFile() const;
|
||||
QString projectFilePath() const;
|
||||
|
||||
bool showInSimpleTree() const;
|
||||
bool showInSimpleTree() const override;
|
||||
|
||||
QList<ProjectExplorer::ProjectAction> supportedActions(Node *node) const;
|
||||
QList<ProjectExplorer::ProjectAction> supportedActions(Node *node) const override;
|
||||
|
||||
bool addFiles(const QStringList &filePaths, QStringList *notAdded = 0);
|
||||
bool removeFiles(const QStringList &filePaths, QStringList *notRemoved = 0);
|
||||
bool renameFile(const QString &filePath, const QString &newFilePath);
|
||||
bool addFiles(const QStringList &filePaths, QStringList *notAdded = 0) override;
|
||||
bool removeFiles(const QStringList &filePaths, QStringList *notRemoved = 0) override;
|
||||
bool renameFile(const QString &filePath, const QString &newFilePath) override;
|
||||
|
||||
void refresh(QSet<QString> oldFileList = QSet<QString>());
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@ public:
|
||||
FileType fileType() const;
|
||||
bool isGenerated() const;
|
||||
|
||||
FileNode *asFileNode();
|
||||
FileNode *asFileNode() override;
|
||||
|
||||
private:
|
||||
// managed by ProjectNode
|
||||
@@ -172,9 +172,9 @@ class PROJECTEXPLORER_EXPORT FolderNode : public Node
|
||||
public:
|
||||
explicit FolderNode(const Utils::FileName &folderPath, NodeType nodeType = FolderNodeType,
|
||||
const QString &displayName = QString());
|
||||
virtual ~FolderNode();
|
||||
~FolderNode() override;
|
||||
|
||||
QString displayName() const;
|
||||
QString displayName() const override;
|
||||
QIcon icon() const;
|
||||
|
||||
QList<FileNode*> fileNodes() const;
|
||||
@@ -213,7 +213,7 @@ public:
|
||||
void addFolderNodes(const QList<FolderNode*> &subFolders);
|
||||
void removeFolderNodes(const QList<FolderNode*> &subFolders);
|
||||
|
||||
FolderNode *asFolderNode();
|
||||
FolderNode *asFolderNode() override;
|
||||
|
||||
protected:
|
||||
QList<FolderNode*> m_subFolderNodes;
|
||||
@@ -230,7 +230,7 @@ class PROJECTEXPLORER_EXPORT VirtualFolderNode : public FolderNode
|
||||
{
|
||||
public:
|
||||
explicit VirtualFolderNode(const Utils::FileName &folderPath, int priority);
|
||||
virtual ~VirtualFolderNode();
|
||||
~VirtualFolderNode() override;
|
||||
|
||||
int priority() const;
|
||||
private:
|
||||
@@ -291,18 +291,18 @@ class PROJECTEXPLORER_EXPORT SessionNode : public FolderNode
|
||||
public:
|
||||
SessionNode();
|
||||
|
||||
QList<ProjectAction> supportedActions(Node *node) const;
|
||||
QList<ProjectAction> supportedActions(Node *node) const override;
|
||||
|
||||
QList<ProjectNode*> projectNodes() const;
|
||||
|
||||
void accept(NodesVisitor *visitor);
|
||||
void accept(NodesVisitor *visitor) override;
|
||||
|
||||
bool isEnabled() const { return true; }
|
||||
bool isEnabled() const override { return true; }
|
||||
|
||||
bool showInSimpleTree() const;
|
||||
bool showInSimpleTree() const override;
|
||||
void projectDisplayNameChanged(Node *node);
|
||||
|
||||
SessionNode *asSessionNode();
|
||||
SessionNode *asSessionNode() override;
|
||||
protected:
|
||||
void addProjectNodes(const QList<ProjectNode*> &projectNodes);
|
||||
void removeProjectNodes(const QList<ProjectNode*> &projectNodes);
|
||||
|
||||
@@ -778,7 +778,7 @@ public:
|
||||
, m_displayName(nodeDisplayName)
|
||||
{}
|
||||
|
||||
QString displayName() const { return m_displayName; }
|
||||
QString displayName() const override { return m_displayName; }
|
||||
private:
|
||||
QString m_displayName;
|
||||
};
|
||||
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
QbsFileNode(const Utils::FileName &filePath, const ProjectExplorer::FileType fileType, bool generated,
|
||||
int line);
|
||||
|
||||
QString displayName() const;
|
||||
QString displayName() const override;
|
||||
};
|
||||
|
||||
class QbsFolderNode : public ProjectExplorer::FolderNode
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
const QString &displayName);
|
||||
|
||||
private:
|
||||
QList<ProjectExplorer::ProjectAction> supportedActions(ProjectExplorer::Node *node) const;
|
||||
QList<ProjectExplorer::ProjectAction> supportedActions(ProjectExplorer::Node *node) const override;
|
||||
};
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@@ -78,9 +78,9 @@ class QbsBaseProjectNode : public ProjectExplorer::ProjectNode
|
||||
public:
|
||||
explicit QbsBaseProjectNode(const Utils::FileName &path);
|
||||
|
||||
bool showInSimpleTree() const;
|
||||
bool showInSimpleTree() const override;
|
||||
|
||||
QList<ProjectExplorer::ProjectAction> supportedActions(Node *node) const;
|
||||
QList<ProjectExplorer::ProjectAction> supportedActions(Node *node) const override;
|
||||
private:
|
||||
friend class QbsGroupNode;
|
||||
};
|
||||
@@ -94,11 +94,11 @@ class QbsGroupNode : public QbsBaseProjectNode
|
||||
public:
|
||||
QbsGroupNode(const qbs::GroupData &grp, const QString &productPath);
|
||||
|
||||
bool isEnabled() const;
|
||||
QList<ProjectExplorer::ProjectAction> supportedActions(Node *node) const;
|
||||
bool addFiles(const QStringList &filePaths, QStringList *notAdded = 0);
|
||||
bool removeFiles(const QStringList &filePaths, QStringList *notRemoved = 0);
|
||||
bool renameFile(const QString &filePath, const QString &newFilePath);
|
||||
bool isEnabled() const override;
|
||||
QList<ProjectExplorer::ProjectAction> supportedActions(Node *node) const override;
|
||||
bool addFiles(const QStringList &filePaths, QStringList *notAdded = 0) override;
|
||||
bool removeFiles(const QStringList &filePaths, QStringList *notRemoved = 0) override;
|
||||
bool renameFile(const QString &filePath, const QString &newFilePath) override;
|
||||
void updateQbsGroupData(const qbs::GroupData &grp, const QString &productPath,
|
||||
bool productWasEnabled, bool productIsEnabled);
|
||||
|
||||
@@ -130,17 +130,17 @@ class QbsProductNode : public QbsBaseProjectNode
|
||||
public:
|
||||
explicit QbsProductNode(const qbs::Project &project, const qbs::ProductData &prd);
|
||||
|
||||
bool isEnabled() const;
|
||||
bool showInSimpleTree() const;
|
||||
QList<ProjectExplorer::ProjectAction> supportedActions(Node *node) const;
|
||||
bool addFiles(const QStringList &filePaths, QStringList *notAdded = 0);
|
||||
bool removeFiles(const QStringList &filePaths, QStringList *notRemoved = 0);
|
||||
bool renameFile(const QString &filePath, const QString &newFilePath);
|
||||
bool isEnabled() const override;
|
||||
bool showInSimpleTree() const override;
|
||||
QList<ProjectExplorer::ProjectAction> supportedActions(Node *node) const override;
|
||||
bool addFiles(const QStringList &filePaths, QStringList *notAdded = 0) override;
|
||||
bool removeFiles(const QStringList &filePaths, QStringList *notRemoved = 0) override;
|
||||
bool renameFile(const QString &filePath, const QString &newFilePath) override;
|
||||
|
||||
void setQbsProductData(const qbs::Project &project, const qbs::ProductData prd);
|
||||
const qbs::ProductData qbsProductData() const { return m_qbsProductData; }
|
||||
|
||||
QList<ProjectExplorer::RunConfiguration *> runConfigurations() const;
|
||||
QList<ProjectExplorer::RunConfiguration *> runConfigurations() const override;
|
||||
|
||||
private:
|
||||
QbsGroupNode *findGroupNode(const QString &name);
|
||||
@@ -157,13 +157,13 @@ class QbsProjectNode : public QbsBaseProjectNode
|
||||
{
|
||||
public:
|
||||
explicit QbsProjectNode(const Utils::FileName &path);
|
||||
~QbsProjectNode();
|
||||
~QbsProjectNode() override;
|
||||
|
||||
virtual QbsProject *project() const;
|
||||
const qbs::Project qbsProject() const;
|
||||
const qbs::ProjectData qbsProjectData() const { return m_projectData; }
|
||||
|
||||
bool showInSimpleTree() const;
|
||||
bool showInSimpleTree() const override;
|
||||
|
||||
protected:
|
||||
void update(const qbs::Project &qbsProject, const qbs::ProjectData &prjData);
|
||||
@@ -190,7 +190,7 @@ public:
|
||||
using QbsProjectNode::update;
|
||||
void update();
|
||||
|
||||
QbsProject *project() const { return m_project; }
|
||||
QbsProject *project() const override { return m_project; }
|
||||
|
||||
private:
|
||||
QStringList unreferencedBuildSystemFiles(const qbs::Project &p) const;
|
||||
|
||||
@@ -138,27 +138,27 @@ class QMAKEPROJECTMANAGER_EXPORT QmakePriFileNode : public ProjectExplorer::Proj
|
||||
{
|
||||
public:
|
||||
QmakePriFileNode(QmakeProject *project, QmakeProFileNode *qmakeProFileNode, const Utils::FileName &filePath);
|
||||
~QmakePriFileNode();
|
||||
~QmakePriFileNode() override;
|
||||
|
||||
void update(const Internal::PriFileEvalResult &result);
|
||||
|
||||
|
||||
// ProjectNode interface
|
||||
QList<ProjectExplorer::ProjectAction> supportedActions(Node *node) const;
|
||||
QList<ProjectExplorer::ProjectAction> supportedActions(Node *node) const override;
|
||||
|
||||
bool showInSimpleTree() const { return false; }
|
||||
bool showInSimpleTree() const override { return false; }
|
||||
|
||||
bool canAddSubProject(const QString &proFilePath) const;
|
||||
bool canAddSubProject(const QString &proFilePath) const override;
|
||||
|
||||
bool addSubProjects(const QStringList &proFilePaths);
|
||||
bool removeSubProjects(const QStringList &proFilePaths);
|
||||
bool addSubProjects(const QStringList &proFilePaths) override;
|
||||
bool removeSubProjects(const QStringList &proFilePaths) override;
|
||||
|
||||
bool addFiles(const QStringList &filePaths, QStringList *notAdded = 0);
|
||||
bool removeFiles(const QStringList &filePaths, QStringList *notRemoved = 0);
|
||||
bool deleteFiles(const QStringList &filePaths);
|
||||
bool canRenameFile(const QString &filePath, const QString &newFilePath);
|
||||
bool renameFile(const QString &filePath, const QString &newFilePath);
|
||||
AddNewInformation addNewInformation(const QStringList &files, Node *context) const;
|
||||
bool addFiles(const QStringList &filePaths, QStringList *notAdded = 0) override;
|
||||
bool removeFiles(const QStringList &filePaths, QStringList *notRemoved = 0) override;
|
||||
bool deleteFiles(const QStringList &filePaths) override;
|
||||
bool canRenameFile(const QString &filePath, const QString &newFilePath) override;
|
||||
bool renameFile(const QString &filePath, const QString &newFilePath) override;
|
||||
AddNewInformation addNewInformation(const QStringList &files, Node *context) const override;
|
||||
|
||||
bool setProVariable(const QString &var, const QStringList &values,
|
||||
const QString &scope = QString(),
|
||||
@@ -166,8 +166,8 @@ public:
|
||||
|
||||
bool folderChanged(const QString &changedFolder, const QSet<Utils::FileName> &newFiles);
|
||||
|
||||
bool deploysFolder(const QString &folder) const;
|
||||
QList<ProjectExplorer::RunConfiguration *> runConfigurations() const;
|
||||
bool deploysFolder(const QString &folder) const override;
|
||||
QList<ProjectExplorer::RunConfiguration *> runConfigurations() const override;
|
||||
|
||||
QmakeProFileNode *proFileNode() const;
|
||||
QList<QmakePriFileNode*> subProjectNodesExact() const;
|
||||
@@ -265,16 +265,14 @@ class ProVirtualFolderNode : public ProjectExplorer::VirtualFolderNode
|
||||
public:
|
||||
explicit ProVirtualFolderNode(const Utils::FileName &folderPath, int priority, const QString &typeName)
|
||||
: VirtualFolderNode(folderPath, priority), m_typeName(typeName)
|
||||
{
|
||||
{ }
|
||||
|
||||
}
|
||||
|
||||
QString displayName() const
|
||||
QString displayName() const override
|
||||
{
|
||||
return m_typeName;
|
||||
}
|
||||
|
||||
QString tooltip() const
|
||||
QString tooltip() const override
|
||||
{
|
||||
return QString();
|
||||
}
|
||||
@@ -328,13 +326,13 @@ class QMAKEPROJECTMANAGER_EXPORT QmakeProFileNode : public QmakePriFileNode
|
||||
{
|
||||
public:
|
||||
QmakeProFileNode(QmakeProject *project, const Utils::FileName &filePath);
|
||||
~QmakeProFileNode();
|
||||
~QmakeProFileNode() override;
|
||||
|
||||
bool isParent(QmakeProFileNode *node);
|
||||
|
||||
bool showInSimpleTree() const;
|
||||
bool showInSimpleTree() const override;
|
||||
|
||||
AddNewInformation addNewInformation(const QStringList &files, Node *context) const;
|
||||
AddNewInformation addNewInformation(const QStringList &files, Node *context) const override;
|
||||
|
||||
QmakeProjectType projectType() const;
|
||||
|
||||
|
||||
@@ -48,18 +48,18 @@ class QmlProjectNode : public ProjectExplorer::ProjectNode
|
||||
{
|
||||
public:
|
||||
QmlProjectNode(QmlProject *project, Core::IDocument *projectFile);
|
||||
virtual ~QmlProjectNode();
|
||||
~QmlProjectNode() override;
|
||||
|
||||
Core::IDocument *projectFile() const;
|
||||
QString projectFilePath() const;
|
||||
|
||||
virtual bool showInSimpleTree() const;
|
||||
virtual bool showInSimpleTree() const override;
|
||||
|
||||
virtual QList<ProjectExplorer::ProjectAction> supportedActions(Node *node) const;
|
||||
virtual QList<ProjectExplorer::ProjectAction> supportedActions(Node *node) const override;
|
||||
|
||||
virtual bool addFiles(const QStringList &filePaths, QStringList *notAdded = 0);
|
||||
virtual bool deleteFiles(const QStringList &filePaths);
|
||||
virtual bool renameFile(const QString &filePath, const QString &newFilePath);
|
||||
virtual bool addFiles(const QStringList &filePaths, QStringList *notAdded = 0) override;
|
||||
virtual bool deleteFiles(const QStringList &filePaths) override;
|
||||
virtual bool renameFile(const QString &filePath, const QString &newFilePath) override;
|
||||
|
||||
void refresh();
|
||||
|
||||
|
||||
@@ -46,18 +46,18 @@ class RESOURCE_EXPORT ResourceTopLevelNode : public ProjectExplorer::FolderNode
|
||||
{
|
||||
public:
|
||||
ResourceTopLevelNode(const Utils::FileName &filePath, FolderNode *parent);
|
||||
~ResourceTopLevelNode();
|
||||
~ResourceTopLevelNode() override;
|
||||
void update();
|
||||
|
||||
QList<ProjectExplorer::ProjectAction> supportedActions(Node *node) const;
|
||||
bool addFiles(const QStringList &filePaths, QStringList *notAdded);
|
||||
bool removeFiles(const QStringList &filePaths, QStringList *notRemoved);
|
||||
QList<ProjectExplorer::ProjectAction> supportedActions(Node *node) const override;
|
||||
bool addFiles(const QStringList &filePaths, QStringList *notAdded) override;
|
||||
bool removeFiles(const QStringList &filePaths, QStringList *notRemoved) override;
|
||||
|
||||
bool addPrefix(const QString &prefix, const QString &lang);
|
||||
bool removePrefix(const QString &prefix, const QString &lang);
|
||||
|
||||
AddNewInformation addNewInformation(const QStringList &files, Node *context) const;
|
||||
bool showInSimpleTree() const;
|
||||
AddNewInformation addNewInformation(const QStringList &files, Node *context) const override;
|
||||
bool showInSimpleTree() const override;
|
||||
bool removeNonExistingFiles();
|
||||
|
||||
private:
|
||||
@@ -70,19 +70,19 @@ class ResourceFolderNode : public ProjectExplorer::FolderNode
|
||||
friend class ResourceEditor::ResourceTopLevelNode; // for updateFiles
|
||||
public:
|
||||
ResourceFolderNode(const QString &prefix, const QString &lang, ResourceTopLevelNode *parent);
|
||||
~ResourceFolderNode();
|
||||
~ResourceFolderNode() override;
|
||||
|
||||
QList<ProjectExplorer::ProjectAction> supportedActions(Node *node) const;
|
||||
QList<ProjectExplorer::ProjectAction> supportedActions(Node *node) const override;
|
||||
|
||||
QString displayName() const;
|
||||
QString displayName() const override;
|
||||
|
||||
bool addFiles(const QStringList &filePaths, QStringList *notAdded);
|
||||
bool removeFiles(const QStringList &filePaths, QStringList *notRemoved);
|
||||
bool renameFile(const QString &filePath, const QString &newFilePath);
|
||||
bool addFiles(const QStringList &filePaths, QStringList *notAdded) override;
|
||||
bool removeFiles(const QStringList &filePaths, QStringList *notRemoved) override;
|
||||
bool renameFile(const QString &filePath, const QString &newFilePath) override;
|
||||
|
||||
bool renamePrefix(const QString &prefix, const QString &lang);
|
||||
|
||||
AddNewInformation addNewInformation(const QStringList &files, Node *context) const;
|
||||
AddNewInformation addNewInformation(const QStringList &files, Node *context) const override;
|
||||
|
||||
QString prefix() const;
|
||||
QString lang() const;
|
||||
@@ -99,9 +99,9 @@ class ResourceFileNode : public ProjectExplorer::FileNode
|
||||
public:
|
||||
ResourceFileNode(const Utils::FileName &filePath, const QString &qrcPath, ResourceTopLevelNode *topLevel);
|
||||
|
||||
QString displayName() const;
|
||||
QString displayName() const override;
|
||||
QString qrcPath() const;
|
||||
QList<ProjectExplorer::ProjectAction> supportedActions(Node *node) const;
|
||||
QList<ProjectExplorer::ProjectAction> supportedActions(Node *node) const override;
|
||||
|
||||
private:
|
||||
QString m_displayName;
|
||||
|
||||
Reference in New Issue
Block a user