diff options
author | Petar Perisin <petar.perisin@gmail.com> | 2013-03-26 20:02:06 +0200 |
---|---|---|
committer | Petar Perisin <petar.perisin@gmail.com> | 2013-04-05 11:27:57 +0200 |
commit | 83d51b26913125e55e9390bd26cf04c4780cdf39 (patch) | |
tree | 6f43c41b89888b59c011d7565d71b38683a9d05e /src/plugins/git/gerrit/gerritparameters.cpp | |
parent | 42547062af82c42bd6224801b1e0c3dddfba58ee (diff) | |
download | qt-creator-83d51b26913125e55e9390bd26cf04c4780cdf39.tar.gz |
Gerrit: added ability to save path for applying patches
Change-Id: I3cc8f1d19784145a7fbf19c321ccbc079847fbc2
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Diffstat (limited to 'src/plugins/git/gerrit/gerritparameters.cpp')
-rw-r--r-- | src/plugins/git/gerrit/gerritparameters.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/plugins/git/gerrit/gerritparameters.cpp b/src/plugins/git/gerrit/gerritparameters.cpp index 3203295b50..14d30f4b05 100644 --- a/src/plugins/git/gerrit/gerritparameters.cpp +++ b/src/plugins/git/gerrit/gerritparameters.cpp @@ -50,7 +50,9 @@ static const char userKeyC[] = "User"; static const char portKeyC[] = "Port"; static const char portFlagKeyC[] = "PortFlag"; static const char sshKeyC[] = "Ssh"; +static const char repositoryKeyC[] = "RepoPath"; static const char httpsKeyC[] = "Https"; +static const char promptPathKeyC[] = "PromptPath"; static const char defaultHostC[] = "codereview.qt-project.org"; static const char defaultSshC[] = "ssh"; static const char savedQueriesKeyC[] = "SavedQueries"; @@ -99,6 +101,7 @@ GerritParameters::GerritParameters() : host(QLatin1String(defaultHostC)) , port(defaultPort) , https(true) + , promptPath(true) , portFlag(QLatin1String(defaultPortFlag)) { } @@ -118,8 +121,8 @@ QString GerritParameters::sshHostArgument() const bool GerritParameters::equals(const GerritParameters &rhs) const { - return port == rhs.port && host == rhs.host && user == rhs.user - && ssh == rhs.ssh && https == rhs.https; + return port == rhs.port && host == rhs.host && user == rhs.user && promptPath == rhs.promptPath + && ssh == rhs.ssh && https == rhs.https && repositoryPath == rhs.repositoryPath; } void GerritParameters::toSettings(QSettings *s) const @@ -130,7 +133,9 @@ void GerritParameters::toSettings(QSettings *s) const s->setValue(QLatin1String(portKeyC), port); s->setValue(QLatin1String(portFlagKeyC), portFlag); s->setValue(QLatin1String(sshKeyC), ssh); + s->setValue(QLatin1String(repositoryKeyC), repositoryPath); s->setValue(QLatin1String(httpsKeyC), https); + s->setValue(QLatin1String(promptPathKeyC), promptPath); s->endGroup(); } @@ -147,11 +152,13 @@ void GerritParameters::fromSettings(const QSettings *s) host = s->value(rootKey + QLatin1String(hostKeyC), QLatin1String(defaultHostC)).toString(); user = s->value(rootKey + QLatin1String(userKeyC), QString()).toString(); ssh = s->value(rootKey + QLatin1String(sshKeyC), QString()).toString(); + repositoryPath = s->value(rootKey + QLatin1String(repositoryKeyC), QString()).toString(); port = s->value(rootKey + QLatin1String(portKeyC), QVariant(int(defaultPort))).toInt(); portFlag = s->value(rootKey + QLatin1String(portFlagKeyC), QLatin1String(defaultPortFlag)).toString(); savedQueries = s->value(rootKey + QLatin1String(savedQueriesKeyC), QString()).toString() .split(QLatin1String(",")); https = s->value(rootKey + QLatin1String(httpsKeyC), QVariant(true)).toBool(); + promptPath = s->value(rootKey + QLatin1String(promptPathKeyC), QVariant(true)).toBool(); if (ssh.isEmpty()) ssh = detectSsh(); } |