Commit f7e07926 authored by Isa's avatar Isa Committed by Andreas Traczyk

ux: modify second id displayed in AccountListModel

Change-Id: Ie7a50eff8ef855c48485556544e0be50a252c7ce
Reviewed-by: Andreas Traczyk's avatarAndreas Traczyk <>
parent 1c20ef15
......@@ -112,7 +112,8 @@ AccountItemDelegate::paint(QPainter* painter,
painter->drawText(rectTexts, Qt::AlignVCenter | Qt::AlignLeft, nameStr);
// Display the ID under the name
// Display the secondary ID under the name
QString idStr =<int>(AccountListModel::Role::Username)).value<QString>();
if (idStr != name.toString()) {
......@@ -62,7 +62,7 @@ QVariant AccountListModel::data(const QModelIndex &index, int role) const
case Qt::DisplayRole:
return QVariant(QString::fromStdString(accountInfo.profileInfo.alias));
case Role::Username:
return QVariant(QString::fromStdString(accountInfo.profileInfo.uri));
return QVariant(QString::fromStdString(Utils::secondBestNameForAccount(accountInfo)));
case Role::Type:
return QVariant(Utils::toUnderlyingValue<lrc::api::profile::Type>(accountInfo.profileInfo.type));
case Role::Status:
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