Git: Check remote port for isValid in GitRemote

Change-Id: Iab922abcde0ac055417467f3c63a31dffa721986
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Andre Hartmann
2018-10-07 15:26:22 +02:00
committed by André Hartmann
parent 0dfb2938ed
commit 96f982a016
2 changed files with 9 additions and 2 deletions

View File

@@ -3403,12 +3403,13 @@ GitRemote::GitRemote(const QString &url)
if (!match.hasMatch())
return;
bool ok = false;
protocol = match.captured("protocol");
userName = match.captured("user");
host = match.captured("host");
port = match.captured("port").toUShort();
port = match.captured("port").toUShort(&ok);
path = match.captured("path");
isValid = true;
isValid = ok || match.captured("port").isEmpty();
}
} // namespace Internal