projects
/
nextcloud-desktop.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8e2b9c6
)
Account: Display non-standard port as part of the hostname
author
Daniel Molkentin
<danimo@owncloud.com>
Thu, 10 Sep 2015 08:17:16 +0000
(10:17 +0200)
committer
Daniel Molkentin
<danimo@owncloud.com>
Thu, 10 Sep 2015 08:17:31 +0000
(10:17 +0200)
Addresses #3658
src/gui/accountstate.cpp
patch
|
blob
|
history
diff --git
a/src/gui/accountstate.cpp
b/src/gui/accountstate.cpp
index 76314128a21a8ac7d7a70b92000e8102e032e5d3..1dac2ea28cdc81c60b4ade3dc4a0fac230abb350 100644
(file)
--- 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::Elide
Right
, width);
+ host = fm.elidedText(host, Qt::Elide
Middle
, width);
user = fm.elidedText(user, Qt::ElideRight, width);
}
return user + QLatin1String("\n") + host;