Gerrit: Ignore default port when comparing servers

The user can have the default port set in .ssh/config

Change-Id: I2b59b224c15ed32326e7daa2e33dbb9fe398a137
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Orgad Shaneh
2017-02-23 13:30:03 +02:00
committed by Orgad Shaneh
parent b6a9aeef59
commit 86f32f5b9c

View File

@@ -84,7 +84,9 @@ GerritServer::GerritServer(const QString &host, unsigned short port,
bool GerritServer::operator==(const GerritServer &other) const
{
return host == other.host && user == other.user && port == other.port && type == other.type;
if (port && other.port && port != other.port)
return false;
return host == other.host && user == other.user && type == other.type;
}
void GerritParameters::setPortFlagBySshType()