Commit fb2a1fcb authored by Tobias Hunger's avatar Tobias Hunger

Python: Simplify project node

Change-Id: I21bf32612d10efce2ad8727637104f51013ae370
Reviewed-by: default avatarhjk <hjk@theqtcompany.com>
parent 2ff1fe69
......@@ -331,10 +331,7 @@ private:
class PythonProjectNode : public ProjectNode
{
public:
PythonProjectNode(PythonProject *project, Core::IDocument *projectFile);
Core::IDocument *projectFile() const;
QString projectFilePath() const;
PythonProjectNode(PythonProject *project);
bool showInSimpleTree() const override;
......@@ -351,7 +348,6 @@ private:
private:
PythonProject *m_project;
Core::IDocument *m_projectFile;
};
class PythonRunConfigurationWidget : public QWidget
......@@ -637,7 +633,7 @@ PythonProject::PythonProject(PythonProjectManager *manager, const QString &fileN
DocumentManager::addDocument(m_document);
m_rootNode = new PythonProjectNode(this, m_document);
m_rootNode = new PythonProjectNode(this);
m_manager->registerProject(this);
}
......@@ -893,22 +889,11 @@ Project::RestoreResult PythonProject::fromMap(const QVariantMap &map, QString *e
return res;
}
PythonProjectNode::PythonProjectNode(PythonProject *project, Core::IDocument *projectFile)
: ProjectNode(projectFile->filePath())
PythonProjectNode::PythonProjectNode(PythonProject *project)
: ProjectNode(project->projectFilePath())
, m_project(project)
, m_projectFile(projectFile)
{
setDisplayName(projectFile->filePath().toFileInfo().completeBaseName());
}
Core::IDocument *PythonProjectNode::projectFile() const
{
return m_projectFile;
}
QString PythonProjectNode::projectFilePath() const
{
return m_projectFile->filePath().toString();
setDisplayName(project->projectFilePath().toFileInfo().completeBaseName());
}
QHash<QString, QStringList> sortFilesIntoPaths(const QString &base, const QSet<QString> &files)
......
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