[Pkg-owncloud-commits] [owncloud-client] 104/218: Account: Also display non-standard port in tray menu

Sandro Knauß hefee-guest at moszumanska.debian.org
Sat Oct 17 14:30:53 UTC 2015


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 1de4d96ab1978ea15724c6eaa955bac6b36650f3
Author: Markus Goetz <markus at woboq.com>
Date:   Thu Sep 10 19:26:27 2015 -0400

    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 86c808c..ce9deb4 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

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list