diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2017-05-04 14:57:12 +0300 |
---|---|---|
committer | Orgad Shaneh <orgads@gmail.com> | 2017-05-04 12:15:17 +0000 |
commit | b67f8536506045f93a7948392307c3868081c833 (patch) | |
tree | 78be0d8f16d6a37290455bdf1fa35a83d6d2c0b4 | |
parent | 83c8c9ad360157f04bdf64d0e9b9c6c61ff5d10b (diff) | |
download | qt-creator-b67f8536506045f93a7948392307c3868081c833.tar.gz |
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>
-rw-r--r-- | src/plugins/git/gerrit/gerritmodel.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/git/gerrit/gerritmodel.cpp b/src/plugins/git/gerrit/gerritmodel.cpp index aed258fb74..08196d8136 100644 --- a/src/plugins/git/gerrit/gerritmodel.cpp +++ b/src/plugins/git/gerrit/gerritmodel.cpp @@ -799,7 +799,8 @@ static bool parseOutput(const QSharedPointer<GerritParameters> ¶meters, } else { adaptedOutput = output; // Strip first line, which is )]}' - adaptedOutput.remove(0, adaptedOutput.indexOf("\n")); + if (adaptedOutput.startsWith(')')) + adaptedOutput.remove(0, adaptedOutput.indexOf("\n")); } bool res = true; |