forked from qt-creator/qt-creator
Gerrit: Workaround gerrit issue when origin has /p prefix
/p was used with older versions of gerrit. It is no longer required, but still supported. Change-Id: Ie7c6a941031c56cf805c13518deec0fadb2f69ab Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
committed by
Orgad Shaneh
parent
b18f9db8d7
commit
5ee1030791
@@ -236,6 +236,10 @@ int GerritServer::testConnection()
|
||||
Core::ShellCommand::NoOutput);
|
||||
if (resp.result == SynchronousProcessResponse::Finished) {
|
||||
QString output = resp.stdOut();
|
||||
// Gerrit returns an empty response for /p/qt-creator/a/accounts/self
|
||||
// so consider this as 404.
|
||||
if (output.isEmpty())
|
||||
return PageNotFound;
|
||||
output.remove(0, output.indexOf('\n')); // Strip first line
|
||||
QJsonDocument doc = QJsonDocument::fromJson(output.toUtf8());
|
||||
if (!doc.isNull()) {
|
||||
|
Reference in New Issue
Block a user