forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.3'
Change-Id: I56004e3ec9dc9d92d33bdae438c4f7e069eccc45
This commit is contained in:
@@ -546,7 +546,9 @@ static GerritUser parseGerritUser(const QJsonObject &object)
|
||||
|
||||
static int numberValue(const QJsonObject &object)
|
||||
{
|
||||
return object.value("number").toString().toInt();
|
||||
const QJsonValue number = object.value("number");
|
||||
// Since Gerrit 2.14 (commits fa92467dc and b0cfe1401) the change and patch set numbers are int
|
||||
return number.isString() ? number.toString().toInt() : number.toInt();
|
||||
}
|
||||
|
||||
/* Parse gerrit query Json output.
|
||||
|
||||
@@ -86,7 +86,7 @@ const char stashNamePrefix[] = "stash@{";
|
||||
const char noColorOption[] = "--no-color";
|
||||
const char decorateOption[] = "--decorate";
|
||||
const char showFormatC[] =
|
||||
"--pretty=format:commit %H%n"
|
||||
"--pretty=format:commit %H%d%n"
|
||||
"Author: %an <%ae>, %ad (%ar)%n"
|
||||
"Committer: %cn <%ce>, %cd (%cr)%n"
|
||||
"%n"
|
||||
@@ -359,7 +359,7 @@ private:
|
||||
|
||||
void ShowController::reload()
|
||||
{
|
||||
const QStringList args = {"show", "-s", noColorOption, decorateOption, showFormatC, m_id};
|
||||
const QStringList args = {"show", "-s", noColorOption, showFormatC, m_id};
|
||||
m_state = GettingDescription;
|
||||
runCommand(QList<QStringList>() << args, GitPlugin::client()->encoding(m_directory, "i18n.commitEncoding"));
|
||||
}
|
||||
|
||||
@@ -190,6 +190,7 @@ QString GitPlugin::invalidBranchAndRemoteNamePattern()
|
||||
"|//" // no double slash
|
||||
"|^[/-]" // no leading slash or dash
|
||||
"|\"" // no quotes
|
||||
"|\\*" // no asterisk
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user