Gerrit: Replace bool argument with an enum, and merge url getters

Change-Id: I82035b37de31830f26297944ea0fce8b898201a4
Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
Orgad Shaneh
2017-03-02 08:37:56 +02:00
committed by Orgad Shaneh
parent 45ffa75054
commit 45a84ea6b5
3 changed files with 19 additions and 17 deletions

View File

@@ -54,12 +54,18 @@ public:
Ssh
};
enum UrlType
{
DefaultUrl,
UrlWithHttpUser,
RestUrl
};
GerritServer();
GerritServer(const QString &host, unsigned short port, const QString &userName, HostType type);
bool operator==(const GerritServer &other) const;
QString hostArgument() const;
QString url(bool withHttpUser = false) const;
QString restUrl() const;
QString url(UrlType urlType = DefaultUrl) const;
bool fillFromRemote(const QString &remote, const GerritParameters &parameters);
int testConnection();
static QStringList curlArguments();