forked from qt-creator/qt-creator
Project: Unify handling of displayName
Unify the handling of displayName with a proper changed signal across all projects. Change-Id: I7e503528854b85f6f38de4b0943775f82a0d6123 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -132,6 +132,8 @@ QbsProject::QbsProject(const FileName &fileName) :
|
||||
setProjectContext(Context(Constants::PROJECT_ID));
|
||||
setProjectLanguages(Context(ProjectExplorer::Constants::CXX_LANGUAGE_ID));
|
||||
|
||||
setDisplayName(fileName.toFileInfo().completeBaseName());
|
||||
|
||||
connect(this, &Project::activeTargetChanged, this, &QbsProject::changeActiveTarget);
|
||||
connect(this, &Project::addedTarget, this, &QbsProject::targetWasAdded);
|
||||
connect(this, &Project::removedTarget, this, &QbsProject::targetWasRemoved);
|
||||
@@ -158,11 +160,6 @@ QbsProject::~QbsProject()
|
||||
qDeleteAll(m_extraCompilers);
|
||||
}
|
||||
|
||||
QString QbsProject::displayName() const
|
||||
{
|
||||
return projectFilePath().toFileInfo().completeBaseName();
|
||||
}
|
||||
|
||||
QbsRootProjectNode *QbsProject::rootProjectNode() const
|
||||
{
|
||||
return static_cast<QbsRootProjectNode *>(Project::rootProjectNode());
|
||||
|
||||
Reference in New Issue
Block a user