summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@theqtcompany.com>2015-10-29 16:59:27 +0100
committerTobias Hunger <tobias.hunger@theqtcompany.com>2015-10-30 13:35:53 +0000
commite60f62c131f7596c858553868fb459a931cfde13 (patch)
treeb929264710143c0b744a0dcaa0ee8d388ac5671d
parent66982fc12d5a2e7eed030a5ea1f0256fe4d9eb4b (diff)
downloadqt-creator-e60f62c131f7596c858553868fb459a931cfde13.tar.gz
ProjectNodes: Sprinkle override over the Node classes
Change-Id: I87db3a1b212aa0a3f140b8d299679f6c1f691004 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
-rw-r--r--src/plugins/autotoolsprojectmanager/autotoolsprojectnode.h4
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeprojectnodes.h4
-rw-r--r--src/plugins/genericprojectmanager/genericprojectnodes.h10
-rw-r--r--src/plugins/projectexplorer/projectnodes.h20
-rw-r--r--src/plugins/pythoneditor/pythoneditorplugin.cpp2
-rw-r--r--src/plugins/qbsprojectmanager/qbsnodes.h40
-rw-r--r--src/plugins/qmakeprojectmanager/qmakenodes.h44
-rw-r--r--src/plugins/qmlprojectmanager/qmlprojectnodes.h12
-rw-r--r--src/plugins/resourceeditor/resourcenode.h30
9 files changed, 82 insertions, 84 deletions
diff --git a/src/plugins/autotoolsprojectmanager/autotoolsprojectnode.h b/src/plugins/autotoolsprojectmanager/autotoolsprojectnode.h
index 65c001a612..b801df8901 100644
--- a/src/plugins/autotoolsprojectmanager/autotoolsprojectnode.h
+++ b/src/plugins/autotoolsprojectmanager/autotoolsprojectnode.h
@@ -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;
diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectnodes.h b/src/plugins/cmakeprojectmanager/cmakeprojectnodes.h
index ebd92c335a..7017664d9a 100644
--- a/src/plugins/cmakeprojectmanager/cmakeprojectnodes.h
+++ b/src/plugins/cmakeprojectmanager/cmakeprojectnodes.h
@@ -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
diff --git a/src/plugins/genericprojectmanager/genericprojectnodes.h b/src/plugins/genericprojectmanager/genericprojectnodes.h
index 9256c80d49..b8ebe161fa 100644
--- a/src/plugins/genericprojectmanager/genericprojectnodes.h
+++ b/src/plugins/genericprojectmanager/genericprojectnodes.h
@@ -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>());
diff --git a/src/plugins/projectexplorer/projectnodes.h b/src/plugins/projectexplorer/projectnodes.h
index 27a9eabc7e..6e923f0594 100644
--- a/src/plugins/projectexplorer/projectnodes.h
+++ b/src/plugins/projectexplorer/projectnodes.h
@@ -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);
diff --git a/src/plugins/pythoneditor/pythoneditorplugin.cpp b/src/plugins/pythoneditor/pythoneditorplugin.cpp
index b4daa03614..b14f6e2643 100644
--- a/src/plugins/pythoneditor/pythoneditorplugin.cpp
+++ b/src/plugins/pythoneditor/pythoneditorplugin.cpp
@@ -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;
};
diff --git a/src/plugins/qbsprojectmanager/qbsnodes.h b/src/plugins/qbsprojectmanager/qbsnodes.h
index 72196d54ad..c368c73d64 100644
--- a/src/plugins/qbsprojectmanager/qbsnodes.h
+++ b/src/plugins/qbsprojectmanager/qbsnodes.h
@@ -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,12 +190,12 @@ 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;
- QbsProject * const m_project;
+ QbsProject *const m_project;
ProjectExplorer::FolderNode *m_buildSystemFiles;
};
diff --git a/src/plugins/qmakeprojectmanager/qmakenodes.h b/src/plugins/qmakeprojectmanager/qmakenodes.h
index 2f80f98ab2..e5f3a3eced 100644
--- a/src/plugins/qmakeprojectmanager/qmakenodes.h
+++ b/src/plugins/qmakeprojectmanager/qmakenodes.h
@@ -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;
+ // ProjectNode interface
+ 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;
diff --git a/src/plugins/qmlprojectmanager/qmlprojectnodes.h b/src/plugins/qmlprojectmanager/qmlprojectnodes.h
index 81dc57346c..7a62d65595 100644
--- a/src/plugins/qmlprojectmanager/qmlprojectnodes.h
+++ b/src/plugins/qmlprojectmanager/qmlprojectnodes.h
@@ -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();
diff --git a/src/plugins/resourceeditor/resourcenode.h b/src/plugins/resourceeditor/resourcenode.h
index c900b1cc80..05666d20a6 100644
--- a/src/plugins/resourceeditor/resourcenode.h
+++ b/src/plugins/resourceeditor/resourcenode.h
@@ -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;