Commit f735c8da authored by Tobias Hunger's avatar Tobias Hunger

GenericProject: Simplify project node

Change-Id: I74b0ab29457f384b63b396aec81655246b0e5e7b
Reviewed-by: default avatarTobias Hunger <tobias.hunger@theqtcompany.com>
parent c251a22d
...@@ -93,7 +93,7 @@ GenericProject::GenericProject(Manager *manager, const QString &fileName) ...@@ -93,7 +93,7 @@ GenericProject::GenericProject(Manager *manager, const QString &fileName)
DocumentManager::addDocument(m_includesIDocument); DocumentManager::addDocument(m_includesIDocument);
DocumentManager::addDocument(m_configIDocument); DocumentManager::addDocument(m_configIDocument);
m_rootNode = new GenericProjectNode(this, m_creatorIDocument); m_rootNode = new GenericProjectNode(this);
FileNode *projectFilesNode = new FileNode(Utils::FileName::fromString(m_filesFileName), FileNode *projectFilesNode = new FileNode(Utils::FileName::fromString(m_filesFileName),
ProjectFileType, ProjectFileType,
......
...@@ -42,22 +42,11 @@ using namespace ProjectExplorer; ...@@ -42,22 +42,11 @@ using namespace ProjectExplorer;
namespace GenericProjectManager { namespace GenericProjectManager {
namespace Internal { namespace Internal {
GenericProjectNode::GenericProjectNode(GenericProject *project, Core::IDocument *projectFile) GenericProjectNode::GenericProjectNode(GenericProject *project)
: ProjectNode(projectFile->filePath()) : ProjectNode(project->projectFilePath())
, m_project(project) , m_project(project)
, m_projectFile(projectFile)
{ {
setDisplayName(projectFile->filePath().toFileInfo().completeBaseName()); setDisplayName(project->projectFilePath().toFileInfo().completeBaseName());
}
Core::IDocument *GenericProjectNode::projectFile() const
{
return m_projectFile;
}
QString GenericProjectNode::projectFilePath() const
{
return m_projectFile->filePath().toString();
} }
QHash<QString, QStringList> sortFilesIntoPaths(const QString &base, const QSet<QString> &files) QHash<QString, QStringList> sortFilesIntoPaths(const QString &base, const QSet<QString> &files)
......
...@@ -47,10 +47,7 @@ class GenericProject; ...@@ -47,10 +47,7 @@ class GenericProject;
class GenericProjectNode : public ProjectExplorer::ProjectNode class GenericProjectNode : public ProjectExplorer::ProjectNode
{ {
public: public:
GenericProjectNode(GenericProject *project, Core::IDocument *projectFile); GenericProjectNode(GenericProject *project);
Core::IDocument *projectFile() const;
QString projectFilePath() const;
bool showInSimpleTree() const override; bool showInSimpleTree() const override;
...@@ -70,7 +67,6 @@ private: ...@@ -70,7 +67,6 @@ private:
private: private:
GenericProject *m_project; GenericProject *m_project;
Core::IDocument *m_projectFile;
}; };
} // namespace Internal } // namespace Internal
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment