[Pkg-owncloud-commits] [owncloud-client] 85/218: Account: Display non-standard port as part of the hostname
Sandro Knauß
hefee-guest at moszumanska.debian.org
Sat Oct 17 14:30:49 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 c0f8ff1030ed1fed1455057d1d33b0eed2f71232
Author: Daniel Molkentin <danimo at owncloud.com>
Date: Thu Sep 10 10:17:16 2015 +0200
Account: Display non-standard port as part of the hostname
Addresses #3658
---
src/gui/accountstate.cpp | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/gui/accountstate.cpp b/src/gui/accountstate.cpp
index 7631412..1dac2ea 100644
--- a/src/gui/accountstate.cpp
+++ b/src/gui/accountstate.cpp
@@ -257,10 +257,15 @@ QString AccountState::shortDisplayNameForSettings(int width) const
{
QString user = account()->credentials()->user();
QString host = account()->url().host();
+ int port = account()->url().port();
+ if (port > 0 && port != 80 && port != 443) {
+ host.append(QLatin1Char(':'));
+ host.append(QString::number(port));
+ }
if (width > 0) {
QFont f;
QFontMetrics fm(f);
- host = fm.elidedText(host, Qt::ElideRight, width);
+ host = fm.elidedText(host, Qt::ElideMiddle, width);
user = fm.elidedText(user, Qt::ElideRight, width);
}
return user + QLatin1String("\n") + host;
--
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