forked from qt-creator/qt-creator
Gerrit: Differentiate by approval type.
- Parse approval type and description. - Format tooltip as HTML table, listing approvals by type - Format the approval column similar to the web view by type character. - Fix the special character issue in Qt 4.8 (query tool actually outputs UTF8 instead of escapes). Change-Id: I803f289a03c5a8ede0029d972a19381b5e783d36 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
@@ -48,25 +48,32 @@ namespace Internal {
|
||||
class GerritParameters;
|
||||
class QueryContext;
|
||||
|
||||
class GerritApproval {
|
||||
public:
|
||||
GerritApproval() : approval(-1) {}
|
||||
|
||||
QString type; // Review type
|
||||
QString description; // Type description, possibly empty
|
||||
QString reviewer;
|
||||
int approval;
|
||||
};
|
||||
|
||||
class GerritPatchSet {
|
||||
public:
|
||||
typedef QPair<QString, int> Approval;
|
||||
|
||||
GerritPatchSet() : patchSetNumber(1) {}
|
||||
QString approvalsToolTip() const;
|
||||
QString approvalsColumn() const;
|
||||
bool hasApproval(const QString &userName) const;
|
||||
int approvalLevel() const;
|
||||
|
||||
QString ref;
|
||||
int patchSetNumber;
|
||||
QList<Approval> approvals;
|
||||
QList<GerritApproval> approvals;
|
||||
};
|
||||
|
||||
class GerritChange
|
||||
{
|
||||
public:
|
||||
typedef QPair<QString, int> Approval;
|
||||
|
||||
GerritChange() : number(0) {}
|
||||
|
||||
bool isValid() const { return number && !url.isEmpty() && !project.isEmpty(); }
|
||||
|
||||
Reference in New Issue
Block a user