Gerrit: Fix REST for Gerrit 2.14

2.14 sends JSON without leading closing parentheses.

Change-Id: I51ec44124e6c3f64b3a76733329fe3ea329c60b0
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Orgad Shaneh
2017-05-04 14:57:12 +03:00
committed by Orgad Shaneh
parent 83c8c9ad36
commit b67f853650

View File

@@ -799,6 +799,7 @@ static bool parseOutput(const QSharedPointer<GerritParameters> &parameters,
} else {
adaptedOutput = output;
// Strip first line, which is )]}'
if (adaptedOutput.startsWith(')'))
adaptedOutput.remove(0, adaptedOutput.indexOf("\n"));
}
bool res = true;