Commit 1f38110d authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

Git: Preserve reviewers list in GerritPushDialog



Not stored in settings (it is not important enough), but usually
the same reviewers are required for consequent changes

Change-Id: I28564791419ac441478db65e51b09189b9f2f196
Reviewed-by: default avatarPetar Perisin <petar.perisin@gmail.com>
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent df767f1c
......@@ -365,7 +365,7 @@ void GerritPlugin::push()
// QScopedPointer is required to delete the dialog when leaving the function
QScopedPointer<GerritPushDialog> dialog(
new GerritPushDialog(topLevel, Core::ICore::mainWindow()));
new GerritPushDialog(topLevel, m_reviewers, Core::ICore::mainWindow()));
if (!dialog->localChangesFound()) {
QMessageBox::warning(Core::ICore::mainWindow(), tr("No Local Changes"),
......@@ -391,7 +391,8 @@ void GerritPlugin::push()
QStringList args;
const QStringList reviewers = dialog->reviewers().split(QLatin1Char(','),
m_reviewers = dialog->reviewers();
const QStringList reviewers = m_reviewers.split(QLatin1Char(','),
QString::SkipEmptyParts);
if (!reviewers.isEmpty()) {
QString reviewersFlag(QLatin1String("--receive-pack=git receive-pack"));
......
......@@ -89,6 +89,7 @@ private:
QSharedPointer<GerritParameters> m_parameters;
QPointer<GerritDialog> m_dialog;
ActionCommandPair m_pushToGerritPair;
QString m_reviewers;
};
} // namespace Internal
......
......@@ -38,7 +38,7 @@
namespace Gerrit {
namespace Internal {
GerritPushDialog::GerritPushDialog(const QString &workingDir, QWidget *parent) :
GerritPushDialog::GerritPushDialog(const QString &workingDir, const QString &reviewerList, QWidget *parent) :
QDialog(parent),
m_workingDir(workingDir),
m_ui(new Ui::GerritPushDialog),
......@@ -126,6 +126,7 @@ GerritPushDialog::GerritPushDialog(const QString &workingDir, QWidget *parent) :
}
connect(m_ui->branchComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(setChangeRange()));
setRemoteBranches();
m_ui->reviewersLineEdit->setText(reviewerList);
m_valid = true;
}
......
......@@ -45,7 +45,7 @@ class GerritPushDialog : public QDialog
Q_OBJECT
public:
GerritPushDialog(const QString &workingDir, QWidget *parent = 0);
GerritPushDialog(const QString &workingDir, const QString &reviewerList, QWidget *parent = 0);
~GerritPushDialog();
QString selectedRemoteName() const;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment