forked from qt-creator/qt-creator
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: Petar Perisin <petar.perisin@gmail.com> Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
df767f1c48
commit
1f38110dad
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user