Gerrit: Add a button for server revalidation

Change-Id: I0ef823aa562093e5e3d63bc2766ab1a95ae259d5
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
This commit is contained in:
Orgad Shaneh
2017-03-13 17:17:40 +02:00
committed by Orgad Shaneh
parent c1d013437f
commit db16f265c9
5 changed files with 21 additions and 6 deletions

View File

@@ -118,7 +118,9 @@ QString GerritServer::url(UrlType urlType) const
return res;
}
bool GerritServer::fillFromRemote(const QString &remote, const GerritParameters &parameters)
bool GerritServer::fillFromRemote(const QString &remote,
const GerritParameters &parameters,
bool forceReload)
{
const GitRemote r(remote);
if (!r.isValid)
@@ -143,7 +145,8 @@ bool GerritServer::fillFromRemote(const QString &remote, const GerritParameters
curlBinary = parameters.curl;
if (curlBinary.isEmpty() || !QFile::exists(curlBinary))
return false;
switch (loadSettings()) {
const StoredHostValidity validity = forceReload ? Invalid : loadSettings();
switch (validity) {
case Invalid:
rootPath = r.path;
// Strip the last part of the path, which is always the repo name