aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/resourceeditor/resourcenode.h
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@qt.io>2017-05-31 15:48:45 +0200
committerTim Jenssen <tim.jenssen@qt.io>2017-08-01 11:24:53 +0000
commit45046f7071f6f4886d697547b508cbd087daf342 (patch)
tree5524bb8e5bb0b559323b84b4381a967b8f901eee /src/plugins/resourceeditor/resourcenode.h
parentbbb54cdebae2d2a2a275c69e4d4309a83087a02a (diff)
ProjectNodes: Do not derive Project Nodes from QObject
That should save some memory per node, and since creator has a lot of nodes (e.g. opening the LLVM project adds about 1 000 000 nodes) this should be noticeable:-) Calling update inside ProjectTree::currentNode() and rename it to findCurrentNode() to make sure it is an still existing pointer. Also, try to reduce the somehow more expensive currentNode() calls and sprinkle some const around that usage. Change-Id: I6a7c5db01a71d53d39544d3013cad557d5b96cdc Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src/plugins/resourceeditor/resourcenode.h')
-rw-r--r--src/plugins/resourceeditor/resourcenode.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/resourceeditor/resourcenode.h b/src/plugins/resourceeditor/resourcenode.h
index e2f84e005a..02cb296805 100644
--- a/src/plugins/resourceeditor/resourcenode.h
+++ b/src/plugins/resourceeditor/resourcenode.h
@@ -42,7 +42,7 @@ public:
QString addFileFilter() const override;
- bool supportsAction(ProjectExplorer::ProjectAction action, Node *node) const override;
+ bool supportsAction(ProjectExplorer::ProjectAction action, const Node *node) const override;
bool addFiles(const QStringList &filePaths, QStringList *notAdded) override;
bool removeFiles(const QStringList &filePaths, QStringList *notRemoved) override;
@@ -68,7 +68,7 @@ public:
ResourceFolderNode(const QString &prefix, const QString &lang, ResourceTopLevelNode *parent);
~ResourceFolderNode() override;
- bool supportsAction(ProjectExplorer::ProjectAction action, Node *node) const override;
+ bool supportsAction(ProjectExplorer::ProjectAction action, const Node *node) const override;
QString displayName() const override;
@@ -98,7 +98,7 @@ public:
QString displayName() const override;
QString qrcPath() const;
- bool supportsAction(ProjectExplorer::ProjectAction action, Node *node) const override;
+ bool supportsAction(ProjectExplorer::ProjectAction action, const Node *node) const override;
private:
QString m_qrcPath;