Gerrit: Use current top level as default repository

* Remove repository setting
* Disable Gerrit menu entry if there is no top level

Change-Id: Ie3f4ca36ae4e7b350034dea7a0de52382da94e90
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Orgad Shaneh
2014-04-02 23:36:16 +03:00
committed by Orgad Shaneh
parent f7db3258b4
commit 0eb363f959
7 changed files with 7 additions and 26 deletions

View File

@@ -50,7 +50,6 @@ 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 defaultHostC[] = "codereview.qt-project.org";
static const char defaultSshC[] = "ssh";
@@ -120,7 +119,7 @@ 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 && repositoryPath == rhs.repositoryPath;
&& ssh == rhs.ssh && https == rhs.https;
}
void GerritParameters::toSettings(QSettings *s) const
@@ -131,7 +130,6 @@ 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->endGroup();
}
@@ -149,7 +147,6 @@ 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()