From 1de4d96ab1978ea15724c6eaa955bac6b36650f3 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Thu, 10 Sep 2015 19:26:27 -0400 Subject: [PATCH] Account: Also display non-standard port in tray menu For #3658 --- src/libsync/account.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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