ProjectExplorer: Handle project file list globally

Handle the generation of the list of files in a project globally, based
on the project tree.

Creator now has the concept of TreeManagers which can enrich the project
tree with additional data (e.g. the files found in a resource file), which
the project does not necessarily know about. So use that tree to find
the files that belong to a project instead of implementing similar features
in each project.

Change-Id: Ia375a914a1f2c0adaa427f9eda834eec2db07f68
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
This commit is contained in:
Tobias Hunger
2017-03-27 12:12:38 +02:00
parent d1a5304564
commit fc5ce1e710
19 changed files with 43 additions and 200 deletions

View File

@@ -51,7 +51,6 @@ public:
bool supportsKit(ProjectExplorer::Kit *k, QString *errorMessage) const override;
Internal::QmlProjectNode *rootProjectNode() const override;
QStringList files(FilesMode fileMode) const override;
bool validProjectFile() const;
@@ -66,7 +65,6 @@ public:
void refresh(RefreshOptions options);
QDir projectDir() const;
QStringList files() const;
QString mainFile() const;
QStringList customImportPaths() const;
@@ -92,10 +90,7 @@ private:
void parseProject(RefreshOptions options);
QmlImport m_defaultImport;
ProjectExplorer::Target *m_activeTarget = 0;
// plain format
QStringList m_files;
ProjectExplorer::Target *m_activeTarget = nullptr;
QPointer<QmlProjectItem> m_projectItem;
};