Gerrit: Add 'Details' text to dialog.

- Add a splitter and a text browser containing detailed text
  for the change using HTML links for email and URL, allowing
  for removal of 'Open', 'Copy URL' buttons.
- Remove large tooltip from list, rename methods to toHtml()
  and use them for the details text.
- Parse out reviewer email.
- Display approval level with sign.

Change-Id: I2d71a80bbe19643e5bfa9deeaaeb3650976f00b4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
Friedemann Kleint
2012-05-16 16:31:58 +02:00
parent 6e224d502d
commit f1b52256cd
4 changed files with 77 additions and 53 deletions

View File

@@ -55,13 +55,14 @@ public:
QString type; // Review type
QString description; // Type description, possibly empty
QString reviewer;
QString email;
int approval;
};
class GerritPatchSet {
public:
GerritPatchSet() : patchSetNumber(1) {}
QString approvalsToolTip() const;
QString approvalsToHtml() const;
QString approvalsColumn() const;
bool hasApproval(const QString &userName) const;
int approvalLevel() const;
@@ -77,7 +78,7 @@ public:
GerritChange() : number(0) {}
bool isValid() const { return number && !url.isEmpty() && !project.isEmpty(); }
QString toolTip() const;
QString toHtml() const;
QString filterString() const;
QStringList gitFetchArguments(const QSharedPointer<GerritParameters> &p) const;