Gerrit: Initialize all members

dependeOnNumber and neededByNumber were not initialized.

Change-Id: I12b90b842d540ae0e8ac9ff5be1be2ace2473ba8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
This commit is contained in:
Orgad Shaneh
2015-11-15 16:52:28 +02:00
committed by Orgad Shaneh
parent 69a4f80c69
commit f910742979

View File

@@ -71,16 +71,14 @@ public:
class GerritChange class GerritChange
{ {
public: public:
GerritChange() : number(0), depth(-1) {}
bool isValid() const { return number && !url.isEmpty() && !project.isEmpty(); } bool isValid() const { return number && !url.isEmpty() && !project.isEmpty(); }
QString filterString() const; QString filterString() const;
QStringList gitFetchArguments(const QSharedPointer<GerritParameters> &p) const; QStringList gitFetchArguments(const QSharedPointer<GerritParameters> &p) const;
QString url; QString url;
int number; int number = 0;
int dependsOnNumber; int dependsOnNumber = 0;
int neededByNumber; int neededByNumber = 0;
QString title; QString title;
QString owner; QString owner;
QString email; QString email;
@@ -89,7 +87,7 @@ public:
QString status; QString status;
QDateTime lastUpdated; QDateTime lastUpdated;
GerritPatchSet currentPatchSet; GerritPatchSet currentPatchSet;
int depth; int depth = -1;
}; };
typedef QSharedPointer<GerritChange> GerritChangePtr; typedef QSharedPointer<GerritChange> GerritChangePtr;