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

CMake: Store project name in root node

Store project name in root node and remove the member variable
that was used for this purpose from the CMakeProject.

Makes sure the same name is used more consistently.

Change-Id: I2b60a15143934bdeffe6c744fd300be7e81c674e
Reviewed-by: default avatarNiels Weber <niels.weber@theqtcompany.com>
parent bbed47b6
......@@ -97,7 +97,7 @@ CMakeProject::CMakeProject(CMakeManager *manager, const FileName &fileName)
setProjectContext(Core::Context(CMakeProjectManager::Constants::PROJECTCONTEXT));
setProjectLanguages(Core::Context(ProjectExplorer::Constants::LANG_CXX));
m_projectName = fileName.parentDir().fileName();
m_rootNode->setDisplayName(fileName.parentDir().fileName());
m_file = new CMakeFile(this, fileName);
......@@ -290,7 +290,6 @@ bool CMakeProject::parseCMakeLists()
// how can we ensure that it is completely written?
m_watcher->addPath(cbpFile);
m_projectName = cbpparser.projectName();
m_rootNode->setDisplayName(cbpparser.projectName());
//qDebug()<<"Building Tree";
......@@ -505,7 +504,7 @@ ProjectExplorer::FolderNode *CMakeProject::findOrCreateFolder(CMakeProjectNode *
QString CMakeProject::displayName() const
{
return m_projectName;
return m_rootNode->displayName();
}
Core::IDocument *CMakeProject::document() const
......
......@@ -149,7 +149,6 @@ private:
ProjectExplorer::Target *m_activeTarget;
Utils::FileName m_fileName;
Internal::CMakeFile *m_file;
QString m_projectName;
// TODO probably need a CMake specific node structure
Internal::CMakeProjectNode *m_rootNode;
......
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