QmakeProject: Use QMAKE_PROJECT_NAME to set the display name

Of both nodes and run configurations.

Change-Id: I04cae590561f3c7b355a3385856dca13ebcd7acf
Task-number: QTCREATORBUG-13950
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
Daniel Teske
2015-08-12 11:16:36 +02:00
parent 326dec96b9
commit 8cbe009cc4
4 changed files with 29 additions and 1 deletions

View File

@@ -140,6 +140,7 @@ void DesktopQmakeRunConfiguration::proFileUpdated(QmakeProFileNode *pro, bool su
if (!parseInProgress) {
emit effectiveTargetInformationChanged();
setDefaultDisplayName(defaultDisplayName());
LocalEnvironmentAspect *aspect = extraAspect<LocalEnvironmentAspect>();
QTC_ASSERT(aspect, return);
aspect->buildEnvironmentHasChanged();
@@ -539,6 +540,14 @@ Utils::FileName DesktopQmakeRunConfiguration::proFilePath() const
QString DesktopQmakeRunConfiguration::defaultDisplayName()
{
auto project = static_cast<QmakeProject *>(target()->project());
const QmakeProFileNode *root = project->rootQmakeProjectNode();
if (root) {
const QmakeProFileNode *node = root->findProFileFor(m_proFilePath);
if (node) // should always be found
return node->displayName();
}
QString defaultName;
if (!m_proFilePath.isEmpty())
defaultName = m_proFilePath.toFileInfo().completeBaseName();