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)
DocumentManager::addDocument(m_includesIDocument);
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),
ProjectFileType,
......
......@@ -42,22 +42,11 @@ using namespace ProjectExplorer;
namespace GenericProjectManager {
namespace Internal {
GenericProjectNode::GenericProjectNode(GenericProject *project, Core::IDocument *projectFile)
: ProjectNode(projectFile->filePath())
GenericProjectNode::GenericProjectNode(GenericProject *project)
: ProjectNode(project->projectFilePath())
, m_project(project)
, m_projectFile(projectFile)
{
setDisplayName(projectFile->filePath().toFileInfo().completeBaseName());
}
Core::IDocument *GenericProjectNode::projectFile() const
{
return m_projectFile;
}
QString GenericProjectNode::projectFilePath() const
{
return m_projectFile->filePath().toString();
setDisplayName(project->projectFilePath().toFileInfo().completeBaseName());
}
QHash<QString, QStringList> sortFilesIntoPaths(const QString &base, const QSet<QString> &files)
......
......@@ -47,10 +47,7 @@ class GenericProject;
class GenericProjectNode : public ProjectExplorer::ProjectNode
{
public:
GenericProjectNode(GenericProject *project, Core::IDocument *projectFile);
Core::IDocument *projectFile() const;
QString projectFilePath() const;
GenericProjectNode(GenericProject *project);
bool showInSimpleTree() const override;
......@@ -70,7 +67,6 @@ private:
private:
GenericProject *m_project;
Core::IDocument *m_projectFile;
};
} // 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