forked from qt-creator/qt-creator
Git: Minor cleanup in ChangeSelectionDialog
Change-Id: Icca80b6588be7a4f1fe5601cae89df19f65e2a5d Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
committed by
Orgad Shaneh
parent
578cdf7c5a
commit
d0b4b190a6
@@ -76,15 +76,15 @@ ChangeSelectionDialog::ChangeSelectionDialog(const QString &workingDirectory, Co
|
|||||||
connect(m_ui->selectFromHistoryButton, &QPushButton::clicked,
|
connect(m_ui->selectFromHistoryButton, &QPushButton::clicked,
|
||||||
this, &ChangeSelectionDialog::selectCommitFromRecentHistory);
|
this, &ChangeSelectionDialog::selectCommitFromRecentHistory);
|
||||||
connect(m_ui->showButton, &QPushButton::clicked,
|
connect(m_ui->showButton, &QPushButton::clicked,
|
||||||
this, &ChangeSelectionDialog::acceptShow);
|
this, std::bind(&ChangeSelectionDialog::accept, this, Show));
|
||||||
connect(m_ui->cherryPickButton, &QPushButton::clicked,
|
connect(m_ui->cherryPickButton, &QPushButton::clicked,
|
||||||
this, &ChangeSelectionDialog::acceptCherryPick);
|
this, std::bind(&ChangeSelectionDialog::accept, this, CherryPick));
|
||||||
connect(m_ui->revertButton, &QPushButton::clicked,
|
connect(m_ui->revertButton, &QPushButton::clicked,
|
||||||
this, &ChangeSelectionDialog::acceptRevert);
|
this, std::bind(&ChangeSelectionDialog::accept, this, Revert));
|
||||||
connect(m_ui->checkoutButton, &QPushButton::clicked,
|
connect(m_ui->checkoutButton, &QPushButton::clicked,
|
||||||
this, &ChangeSelectionDialog::acceptCheckout);
|
this, std::bind(&ChangeSelectionDialog::accept, this, Checkout));
|
||||||
connect(m_ui->archiveButton, &QPushButton::clicked,
|
connect(m_ui->archiveButton, &QPushButton::clicked,
|
||||||
this, &ChangeSelectionDialog::acceptArchive);
|
this, std::bind(&ChangeSelectionDialog::accept, this, Archive));
|
||||||
|
|
||||||
if (id == "Git.Revert")
|
if (id == "Git.Revert")
|
||||||
m_ui->revertButton->setDefault(true);
|
m_ui->revertButton->setDefault(true);
|
||||||
@@ -151,34 +151,10 @@ ChangeCommand ChangeSelectionDialog::command() const
|
|||||||
return m_command;
|
return m_command;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChangeSelectionDialog::acceptArchive()
|
void ChangeSelectionDialog::accept(ChangeCommand command)
|
||||||
{
|
{
|
||||||
m_command = Archive;
|
m_command = command;
|
||||||
accept();
|
QDialog::accept();
|
||||||
}
|
|
||||||
|
|
||||||
void ChangeSelectionDialog::acceptCheckout()
|
|
||||||
{
|
|
||||||
m_command = Checkout;
|
|
||||||
accept();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ChangeSelectionDialog::acceptCherryPick()
|
|
||||||
{
|
|
||||||
m_command = CherryPick;
|
|
||||||
accept();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ChangeSelectionDialog::acceptRevert()
|
|
||||||
{
|
|
||||||
m_command = Revert;
|
|
||||||
accept();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ChangeSelectionDialog::acceptShow()
|
|
||||||
{
|
|
||||||
m_command = Show;
|
|
||||||
accept();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Set commit message in details
|
//! Set commit message in details
|
||||||
|
@@ -69,11 +69,7 @@ private:
|
|||||||
void recalculateCompletion();
|
void recalculateCompletion();
|
||||||
void recalculateDetails();
|
void recalculateDetails();
|
||||||
void changeTextChanged(const QString &text);
|
void changeTextChanged(const QString &text);
|
||||||
void acceptArchive();
|
void accept(ChangeCommand command);
|
||||||
void acceptCheckout();
|
|
||||||
void acceptCherryPick();
|
|
||||||
void acceptRevert();
|
|
||||||
void acceptShow();
|
|
||||||
|
|
||||||
void enableButtons(bool b);
|
void enableButtons(bool b);
|
||||||
void terminateProcess();
|
void terminateProcess();
|
||||||
|
Reference in New Issue
Block a user