forked from qt-creator/qt-creator
ProjectExplorer: Create initial project tree
Create an initial project tree with a ProjectNode and a FileNode for the project file itself. Fix the Projects to not implement their own tree before they have better data. Change-Id: I147ccd5603d22d1d60880a97f30fd8c271eac88c Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -93,7 +93,7 @@ class PythonProject : public Project
|
||||
public:
|
||||
explicit PythonProject(const Utils::FileName &filename);
|
||||
|
||||
QString displayName() const override { return m_projectName; }
|
||||
QString displayName() const override;
|
||||
|
||||
QStringList files(FilesMode) const override { return m_files; }
|
||||
QStringList files() const { return m_files; }
|
||||
@@ -113,7 +113,6 @@ private:
|
||||
QStringList processEntries(const QStringList &paths,
|
||||
QHash<QString, QString> *map = 0) const;
|
||||
|
||||
QString m_projectName;
|
||||
QStringList m_rawFileList;
|
||||
QStringList m_files;
|
||||
QHash<QString, QString> m_rawListEntries;
|
||||
@@ -424,14 +423,14 @@ PythonProject::PythonProject(const FileName &fileName)
|
||||
setId(PythonProjectId);
|
||||
setDocument(new PythonProjectFile(this, fileName));
|
||||
DocumentManager::addDocument(document());
|
||||
setRootProjectNode(new PythonProjectNode(this));
|
||||
|
||||
setProjectContext(Context(PythonProjectContext));
|
||||
setProjectLanguages(Context(ProjectExplorer::Constants::CXX_LANGUAGE_ID));
|
||||
}
|
||||
|
||||
QFileInfo fileInfo = projectFilePath().toFileInfo();
|
||||
|
||||
m_projectName = fileInfo.completeBaseName();
|
||||
QString PythonProject::displayName() const
|
||||
{
|
||||
return projectFilePath().toFileInfo().completeBaseName();
|
||||
}
|
||||
|
||||
static QStringList readLines(const QString &absoluteFileName)
|
||||
|
||||
Reference in New Issue
Block a user