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 <daniel.teske@nokia.com>
This commit is contained in:
Tobias Hunger
2012-06-26 11:59:53 +02:00
parent 489f1a839c
commit 77417e69da

View File

@@ -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) {