Account: Also display non-standard port in tray menu

For #3658
This commit is contained in:
Markus Goetz 2015-09-10 19:26:27 -04:00
parent 78ed4866ce
commit 1de4d96ab1

View file

@ -86,7 +86,13 @@ AccountPtr Account::sharedFromThis()
QString Account::displayName() const
{
auto user = _credentials->user();
return tr("%1@%2").arg(user, _url.host());
QString dn = QString("%1@%2").arg(user, _url.host());
int port = url().port();
if (port > 0 && port != 80 && port != 443) {
dn.append(QLatin1Char(':'));
dn.append(QString::number(port));
}
return dn;
}
QString Account::id() const