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:
@@ -60,12 +60,9 @@ QmlProject::QmlProject(const Utils::FileName &fileName) :
|
||||
setId("QmlProjectManager.QmlProject");
|
||||
setDocument(new Internal::QmlProjectFile(this, fileName));
|
||||
DocumentManager::addDocument(document(), true);
|
||||
setRootProjectNode(new Internal::QmlProjectNode(this));
|
||||
|
||||
setProjectContext(Context(QmlProjectManager::Constants::PROJECTCONTEXT));
|
||||
setProjectLanguages(Context(ProjectExplorer::Constants::QMLJS_LANGUAGE_ID));
|
||||
|
||||
m_projectName = projectFilePath().toFileInfo().completeBaseName();
|
||||
}
|
||||
|
||||
QmlProject::~QmlProject()
|
||||
@@ -273,7 +270,7 @@ void QmlProject::refreshFiles(const QSet<QString> &/*added*/, const QSet<QString
|
||||
|
||||
QString QmlProject::displayName() const
|
||||
{
|
||||
return m_projectName;
|
||||
return projectFilePath().toFileInfo().completeBaseName();
|
||||
}
|
||||
|
||||
bool QmlProject::supportsKit(Kit *k, QString *errorMessage) const
|
||||
|
Reference in New Issue
Block a user