Gerrit: Index by number instead of Change-Id

Change-Id is not unique. It can be reused on several branches of the same
project, or across projects.

Change number is unique.

Change-Id: Id68ae63b4d745817a2cac764fdc8ceebdcb3faa4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
Orgad Shaneh
2015-10-29 14:26:22 +02:00
committed by Orgad Shaneh
parent 155f033f92
commit 78ba92516d
2 changed files with 26 additions and 29 deletions

View File

@@ -79,9 +79,8 @@ public:
QString url;
int number;
QString id;
QString dependsOnId;
QString neededById;
int dependsOnNumber;
int neededByNumber;
QString title;
QString owner;
QString email;
@@ -123,7 +122,7 @@ public:
GerritChangePtr change(const QModelIndex &index) const;
QString toHtml(const QModelIndex &index) const;
QStandardItem *itemForId(const QString &id) const;
QStandardItem *itemForNumber(int number) const;
enum QueryState { Idle, Running, Ok, Error };
QueryState state() const { return m_state; }
@@ -141,7 +140,7 @@ private:
void setState(QueryState s);
QString dependencyHtml(const QString &header, const QString &changeId,
QString dependencyHtml(const QString &header, const int changeNumber,
const QString &serverPrefix) const;
QList<QStandardItem *> changeToRow(const GerritChangePtr &c) const;