Gerrit: Display dependent changes as tree.

Add a depth member to GerritChange indicating the tree depth
and populate it by searches over the dependent changes.
Display the root changes sorted by date and add dependent changes
to their deph=1 parent, avoiding deeply nested items.

Change-Id: I66ccf392ce47514841c661820797e81996e9e5cc
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Friedemann Kleint
2014-06-23 11:44:09 +02:00
parent 49b0b5d3eb
commit 3c13f9484f
3 changed files with 60 additions and 8 deletions

View File

@@ -70,7 +70,7 @@ public:
class GerritChange
{
public:
GerritChange() : number(0) {}
GerritChange() : number(0), depth(-1) {}
bool isValid() const { return number && !url.isEmpty() && !project.isEmpty(); }
QString filterString() const;
@@ -89,6 +89,7 @@ public:
QString status;
QDateTime lastUpdated;
GerritPatchSet currentPatchSet;
int depth;
};
typedef QSharedPointer<GerritChange> GerritChangePtr;