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

@@ -89,7 +89,6 @@ GerritOptionsWidget::GerritOptionsWidget(QWidget *parent)
, m_hostLineEdit(new QLineEdit(this))
, m_userLineEdit(new QLineEdit(this))
, m_sshChooser(new Utils::PathChooser)
, m_repositoryChooser(new Utils::PathChooser)
, m_portSpinBox(new QSpinBox(this))
, m_httpsCheckBox(new QCheckBox(tr("HTTPS")))
{
@@ -101,9 +100,6 @@ GerritOptionsWidget::GerritOptionsWidget(QWidget *parent)
m_sshChooser->setCommandVersionArguments(QStringList(QLatin1String("-V")));
m_sshChooser->setHistoryCompleter(QLatin1String("Git.SshCommand.History"));
formLayout->addRow(tr("&ssh:"), m_sshChooser);
formLayout->addRow(tr("&Repository:"), m_repositoryChooser);
m_repositoryChooser->setToolTip(tr("Default repository where patches will be applied."));
m_repositoryChooser->setHistoryCompleter(QLatin1String("Git.RepoDir.History"));
m_portSpinBox->setMinimum(1);
m_portSpinBox->setMaximum(65535);
formLayout->addRow(tr("&Port:"), m_portSpinBox);
@@ -120,7 +116,6 @@ GerritParameters GerritOptionsWidget::parameters() const
result.host = m_hostLineEdit->text().trimmed();
result.user = m_userLineEdit->text().trimmed();
result.ssh = m_sshChooser->path();
result.repositoryPath = m_repositoryChooser->path();
result.port = m_portSpinBox->value();
result.https = m_httpsCheckBox->isChecked();
return result;
@@ -131,7 +126,6 @@ void GerritOptionsWidget::setParameters(const GerritParameters &p)
m_hostLineEdit->setText(p.host);
m_userLineEdit->setText(p.user);
m_sshChooser->setPath(p.ssh);
m_repositoryChooser->setPath(p.repositoryPath);
m_portSpinBox->setValue(p.port);
m_httpsCheckBox->setChecked(p.https);
}