aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer/projecttree.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/projectexplorer/projecttree.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/projectexplorer/projecttree.h')
-rw-r--r--src/plugins/projectexplorer/projecttree.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/projectexplorer/projecttree.h b/src/plugins/projectexplorer/projecttree.h
index f1dd160c28..87bcb7216c 100644
--- a/src/plugins/projectexplorer/projecttree.h
+++ b/src/plugins/projectexplorer/projecttree.h
@@ -51,7 +51,7 @@ public:
static ProjectTree *instance();
static Project *currentProject();
- static Node *currentNode();
+ static Node *findCurrentNode();
// Integration with ProjectTreeWidget
static void registerWidget(Internal::ProjectTreeWidget *widget);
@@ -102,7 +102,7 @@ private:
static ProjectTree *s_instance;
QList<QPointer<Internal::ProjectTreeWidget>> m_projectTreeWidgets;
QVector<TreeManagerFunction> m_treeManagers;
- QPointer<Node> m_currentNode;
+ Node *m_currentNode = nullptr;
Project *m_currentProject = nullptr;
Internal::ProjectTreeWidget *m_focusForContextMenu = nullptr;
Core::Context m_lastProjectContext;