forked from qt-creator/qt-creator
Refactor ProjectExplorer::Node and remove NodesWatcher
The idea behind NodesWatcher was that it was the central place to catch node related signals, so that users didn't need to connect to each individual node and the nodes didn't need to be QObjects. Somehow Nodes ended up being QObjects anyway. Both the recently added ProjectTree and the FlatModels consume the signals the NodesWatcher sends. Unfortunately there's a ordering dependency between the ProjectTree and the FlatModels. This patch removes all NodesWatcher and instead makes the ProjectTree singleton the emitter of various project tree related signals. The ProjectTree also ensures that the ordering between the FlatModel and itself is taken into account. And it makes Node not derive from QObject, saving some memory in that process. Task-number: QTCREATORBUG-13756 Change-Id: I8b0d357863f1dc1d2d440ce8172502594138b9fb Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
@@ -50,7 +50,6 @@ class QbsProjectFile;
|
||||
|
||||
class QbsFileNode : public ProjectExplorer::FileNode
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
QbsFileNode(const QString &filePath, const ProjectExplorer::FileType fileType, bool generated,
|
||||
int line);
|
||||
@@ -66,8 +65,6 @@ class QbsGroupNode;
|
||||
|
||||
class QbsBaseProjectNode : public ProjectExplorer::ProjectNode
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit QbsBaseProjectNode(const QString &path);
|
||||
|
||||
@@ -96,8 +93,6 @@ private:
|
||||
|
||||
class QbsGroupNode : public QbsBaseProjectNode
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QbsGroupNode(const qbs::GroupData &grp, const QString &productPath);
|
||||
|
||||
@@ -131,8 +126,6 @@ private:
|
||||
|
||||
class QbsProductNode : public QbsBaseProjectNode
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit QbsProductNode(const qbs::Project &project, const qbs::ProductData &prd);
|
||||
|
||||
@@ -161,8 +154,6 @@ private:
|
||||
|
||||
class QbsProjectNode : public QbsBaseProjectNode
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit QbsProjectNode(const QString &path);
|
||||
~QbsProjectNode();
|
||||
@@ -192,8 +183,6 @@ private:
|
||||
|
||||
class QbsRootProjectNode : public QbsProjectNode
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit QbsRootProjectNode(QbsProject *project);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user