diff --git a/src/libsync/account.cpp b/src/libsync/account.cpp index 86c808c74..ce9deb4eb 100644 --- a/src/libsync/account.cpp +++ b/src/libsync/account.cpp @@ -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