From 77417e69da49b21500dad4f821418f948543246e Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Tue, 26 Jun 2012 11:59:53 +0200 Subject: [PATCH] ProfileModel: Do not add "(default)" to name of profile Do not add "(default)" used to mark the default profile to the profiles name when changing some of its settings. Task-number: QTCREATORBUG-7573 Change-Id: I41497013e5321f9169d054f549966fb29329786f Reviewed-by: Daniel Teske --- src/plugins/projectexplorer/profilemodel.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/projectexplorer/profilemodel.cpp b/src/plugins/projectexplorer/profilemodel.cpp index b4da323a813..76d5ffce64a 100644 --- a/src/plugins/projectexplorer/profilemodel.cpp +++ b/src/plugins/projectexplorer/profilemodel.cpp @@ -174,12 +174,14 @@ QVariant ProfileModel::data(const QModelIndex &index, int role) const if (node == m_defaultNode) f.setItalic(f.style() != QFont::StyleItalic); return f; - } else if (role == Qt::DisplayRole || role == Qt::EditRole) { + } else if (role == Qt::DisplayRole) { QString baseName = node->newName.isEmpty() ? node->profile->displayName() : node->newName; if (node == m_defaultNode) //: Mark up a profile as the default one. baseName = tr("%1 (default)").arg(baseName); return baseName; + } else if (role == Qt::EditRole) { + return node->newName.isEmpty() ? node->profile->displayName() : node->newName; } else if (role == Qt::DecorationRole) { return node->profile->isValid() ? QIcon() : warningIcon; } else if (role == Qt::ToolTipRole) {