Commit 2ff1fe69 authored by Tobias Hunger's avatar Tobias Hunger

AutoTools: Simplify projectNode

Change-Id: I15c42a16b076cdb8ae78d54a665a4b7746a994e4
Reviewed-by: default avatarhjk <hjk@theqtcompany.com>
parent 661f436e
......@@ -76,7 +76,7 @@ AutotoolsProject::AutotoolsProject(AutotoolsManager *manager, const QString &fil
m_fileName(fileName),
m_files(),
m_file(new AutotoolsProjectFile(this, m_fileName)),
m_rootNode(new AutotoolsProjectNode(this, m_file)),
m_rootNode(new AutotoolsProjectNode(m_file->filePath())),
m_fileWatcher(new Utils::FileSystemWatcher(this)),
m_watchedFiles(),
m_makefileParserThread(0)
......
......@@ -39,12 +39,9 @@ using namespace AutotoolsProjectManager;
using namespace AutotoolsProjectManager::Internal;
using namespace ProjectExplorer;
AutotoolsProjectNode::AutotoolsProjectNode(AutotoolsProject *project, Core::IDocument *projectFile) :
ProjectNode(projectFile->filePath()),
m_project(project),
m_projectFile(projectFile)
{
}
AutotoolsProjectNode::AutotoolsProjectNode(const Utils::FileName &projectFilePath) :
ProjectNode(projectFilePath)
{ }
bool AutotoolsProjectNode::showInSimpleTree() const
{
......
......@@ -54,18 +54,10 @@ class AutotoolsProject;
class AutotoolsProjectNode : public ProjectExplorer::ProjectNode
{
public:
AutotoolsProjectNode(AutotoolsProject *project, Core::IDocument *projectFile);
AutotoolsProjectNode(const Utils::FileName &projectFilePath);
bool showInSimpleTree() const override;
QList<ProjectExplorer::ProjectAction> supportedActions(Node *node) const override;
private:
AutotoolsProject *m_project;
Core::IDocument *m_projectFile;
// TODO: AutotoolsProject calls the protected function addFileNodes() from AutotoolsProjectNode.
// Instead of this friend declaration, a public interface might be preferable.
friend class AutotoolsProject;
};
} // 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