Commit 661f436e authored by Tobias Hunger's avatar Tobias Hunger

QmlProject: Simplify project node

Change-Id: I370fdb2e6bda67fb4ee5c77d736971460a28a68c
Reviewed-by: default avatarKai Koehne <kai.koehne@theqtcompany.com>
parent b4e65911
......@@ -72,7 +72,7 @@ QmlProject::QmlProject(Internal::Manager *manager, const Utils::FileName &fileNa
m_projectName = fileInfo.completeBaseName();
m_file = new Internal::QmlProjectFile(this, fileName);
m_rootNode = new Internal::QmlProjectNode(this, m_file);
m_rootNode = new Internal::QmlProjectNode(this);
DocumentManager::addDocument(m_file, true);
......
......@@ -41,12 +41,11 @@
namespace QmlProjectManager {
namespace Internal {
QmlProjectNode::QmlProjectNode(QmlProject *project, Core::IDocument *projectFile)
: ProjectExplorer::ProjectNode(projectFile->filePath()),
m_project(project),
m_projectFile(projectFile)
QmlProjectNode::QmlProjectNode(QmlProject *project)
: ProjectExplorer::ProjectNode(project->projectFilePath()),
m_project(project)
{
setDisplayName(projectFile->filePath().toFileInfo().completeBaseName());
setDisplayName(project->projectFilePath().toFileInfo().completeBaseName());
// make overlay
const QSize desiredSize = QSize(16, 16);
const QIcon projectBaseIcon(QLatin1String(":/qmlproject/images/qmlfolder.png"));
......@@ -59,12 +58,6 @@ QmlProjectNode::QmlProjectNode(QmlProject *project, Core::IDocument *projectFile
QmlProjectNode::~QmlProjectNode()
{ }
Core::IDocument *QmlProjectNode::projectFile() const
{ return m_projectFile; }
QString QmlProjectNode::projectFilePath() const
{ return m_projectFile->filePath().toString(); }
void QmlProjectNode::refresh()
{
using namespace ProjectExplorer;
......
......@@ -47,12 +47,9 @@ namespace Internal {
class QmlProjectNode : public ProjectExplorer::ProjectNode
{
public:
QmlProjectNode(QmlProject *project, Core::IDocument *projectFile);
QmlProjectNode(QmlProject *project);
~QmlProjectNode() override;
Core::IDocument *projectFile() const;
QString projectFilePath() const;
virtual bool showInSimpleTree() const override;
virtual QList<ProjectExplorer::ProjectAction> supportedActions(Node *node) const override;
......@@ -69,7 +66,6 @@ private:
private:
QmlProject *m_project;
Core::IDocument *m_projectFile;
QHash<QString, FolderNode *> m_folderByName;
};
......
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